EX-5.1 2 a2194826zex-5_1.htm EXHIBIT 5.1
QuickLinks -- Click here to rapidly navigate through this document

Exhibit 5.1

LOGO


CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM

We consent to the reference to our firm under the caption "Interests of Experts" in the Annual Information Form of TransAlta Corporation (the "Corporation") incorporated by reference in the Registration Statement (Form F-10) and related Prospectus dated October 9, 2009 of the Corporation for the registration of common shares, first preferred shares, warrants to purchase common shares or subscription receipts, each of which entitle the holder to receive upon satisfaction of certain release conditions, and for no additional consideration, one common share, up to an aggregate initial offering price of $1,000,000,000 and to the incorporation by reference therein of our reports dated March 4, 2009, with respect to the consolidated financial statements of the Corporation, the Reconciliation to United States Generally Accepted Accounting Principles, and the effectiveness of internal control over financial reporting of the Corporation, incorporated by reference into its Annual Report (Form 40-F/A) for the year ended December 31, 2008, filed with the Securities and Exchange Commission.

 
GRAPHIC

Calgary, Alberta

  Chartered Accountants

October 9, 2009

   

A member firm of Ernst & Young Global Limited




QuickLinks

CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM