EXHIBIT 5.1
CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM
We consent to the reference to our firm under the caption “Experts” in the Registration Statement (Form F-10) and related short form prospectus of TransAlta Corporation (the “Corporation”) with respect to the sale and issue of (i) Common Shares, (ii) First Preferred Shares, (iii) Warrants to purchase Common Shares, First Preferred Shares or other securities, (iv) Subscription Receipts that entitle the holder thereof to receive upon satisfaction of certain release conditions, and for no additional consideration, Common Shares, (v) debt securities or (vi) any combination of such securities, or (vii) units comprised of one or more of such securities and to the incorporation by reference therein of our reports dated February 22, 2023, with respect to the consolidated financial statements of the Corporation as of December 31, 2022 and 2021 and for each of the three years in the period ended December 31, 2022, and with respect to the effectiveness of internal control over financial reporting as of December 31, 2022 filed as an exhibit to, and incorporated by reference in the Corporation’s Annual Report on Form 40-F filed with the Securities and Exchange Commission.
May 15, 2023 | /s/ Ernst & Young LLP | |
Calgary, Canada | Chartered Professional Accountants |