* Q2 shr C$0.31 vs loss per shr C$0.06 yr-ago
* Cash flow from ops C$1.76 bln
* Oil Sands production totaled 295,500 bpd
* Total upstream production averaged 633,900 boe/day
* Q2 oper shr C$0.50 vs C$0.04 yr-ago
July 29 (Reuters) - Suncor Energy Inc (SU.TO), Canada's No.1 oil production and refining company, posted a second-quarter profit on Thursday, up from a year-prior loss, helped by its acquisition of Petro-Canada and stronger energy prices.
Suncor said its net income was C$480 million ($462.4 million), or 31 Canadian cents per share, up from a loss of C$51 million, or 6 Canadian cents, in the second quarter of 2009.
Operating earnings, which exclude most one-time items, was C$781 million, or 50 Canadian cents per share, from C$38 million, or 4 Canadian cents a share, a year ago.
Analysts, on average, were expecting 36 Canadian cents per share, excluding items, according to Thomson Reuters I/B/E/S.
Suncor is Canada's oil sands operator and swelled its holding in the largest crude reserve outside the Middle East with last year's C$22.7 billion acquisition of Petro-Canada, a deal that also brought new refineries and production from the North Sea and elsewhere.
Suncor's cash flow, a measure of its ability to pay for new projects and drilling, was C$1.76 billion, or C$1.13 per share, from C$295 million, or 31 cents per Canadian share, a year ago.
Benchmark oil prices averaged $78.05 per barrel during the quarter, up 31 percent from the second quarter of 2009 while gas prices rose 14 percent to average $4.35 per million British thermal units. ($1=1.038 Canadian Dollar) (Reporting by Sakthi Prasad in Bangalore)