Secondly, we have continued strong production from our primary heavy oil areas, which averaged over 122,000 barrels per day. And thirdly, production response of our thermal in situ project at Primrose returned to a production cycle from a steaming cycle. Daily average production from this project grew to 94,000 barrels from the first quarter average of 80,000 barrels.
This strong production together with emphasis on cost control and reduction of cost contributed to the growth in our quarterly earnings and cash flow. Cash flow amounted to $1.75 billion, up from $1.28 billion in the first quarter of this year. The cash flow gave us significant room to complete our second quarter capital program of $1.3 billion, payout dividends that have increased by 17% over last year and to buy back 6.2 million common shares under our Normal Course Issuer Bid.
Commodity prices continue to be volatile with a mixed outlook. Natural gas supply demand is out of balance. However, the recent record high temperatures in eastern North America have provided some additional market for natural gas usage, and it does appear that recently there has been a pull-back on development of new production, which may help to stabilize the supply of natural gas. However, having said that, our average price received for natural gas in the second quarter of this year decreased by 54% from the price received in the second quarter of 2011. Clearly the economics of natural gas development has been further compromised and we have curtailed our capital exposure accordingly.
Planned and unplanned maintenance activities at refineries and unplanned pipeline restrictions continue to affect the differential charge against heavy oil. The WCS differential averaged 24% of West Texas price in the second quarter of the year, somewhat higher than the 17% differential in the second quarter of 2011. We are able to positively manage our business over these cycles, and as additional refining capacity and new pipelines are put into service, we will be in a very good position to benefit from these additional markets for heavy oil.