The Ford government's advertising campaign attacking the federal Liberals' carbon pricing system cost Ontario taxpayers $4 million, says the province's auditor general.

The television ad showed nickels spilling out of a gas pump, a heating vent and a man's wallet, accompanied by a voice saying, "The federal government is charging you a carbon tax."

The ads began airing in the spring but at the time, the government declined to state their cost. In her new annual report on government advertising, Auditor General Bonnie Lysyk reveals the $4 million price tag and criticizes the ad campaign as partisan.

"A primary objective of this campaign was to foster a negative impression of the federal government and its carbon pricing policy," writes Lysyk in her report, released Wednesday. "It aimed to foster a positive impression of the provincial governing party by saying that Ontario has a 'better' plan for the environment."

All Ontario government advertising must be approved by the auditor general's office, but the auditor can only reject an ad if it contains the name or image of a cabinet minister or the governing party.

Treasury Board President Peter Bethlenfalvy defended the ad campaign during question period in the legislature Thursday.

"We have an obligation in this province, as any government does, to make the public aware of the issues of the day," Bethlenfalvy told the legislature. "We put out ads throughout the year, as any government would, and will continue to do that."

The auditor previously had wider scope to reject partisan ads but Kathleen Wynne's Liberal government watered down that legislation in 2015. The auditor has criticized that move as opening the door to "publicly funded partisan and self-congratulatory government advertisements."

In their final years in power, Wynne's Liberals ran taxpayer-funded ads the auditor considered to be partisan but was powerless to stop, including a campaign touting a provincial pension plan that never materialized.

The auditor says that last year, the Ford government brought advertising spending down to its lowest level since her office began reviewing ads in 2005. Provincial advertising cost $16.4 million in the 2018-19 fiscal year, down sharply from the $62 million spent in 2017-18 under the former Liberal government.

The auditor's report on advertising came the same day as she released a critique of the Ford government's environment plan. The auditor said the government's forecasts for reducing carbon emissions are not based on sound evidence and said its planned actions are insufficient to hit its climate change targets.

Ontario is pursuing a legal challenge to the federal carbon pricing regime. In June, the province's top court rejected the government's claim that Ottawa does not have the jurisdiction to impose the carbon tax on Ontario. The Ford government wants the Supreme Court to hear an appeal.