Environment and Climate Change Minister Catherine McKenna called out a longtime Conservative MP for the "sexist comment" in which he compared her to a Barbie doll.

Gerry Ritz, the former Minister of Agriculture, wrote "Has anyone told our climate Barbie!" Tuesday in response to another tweet that quoted a U.S. economist about the Paris Agreement on climate change.

Gerry Ritz tweet

The tweet was later deleted from his account, but not until after Twitter users – including McKenna -- called him out for the comment.

"Do you use that sexist language about your daughter, mother, sister?" McKenna tweeted late Tuesday evening.

"We need more women in politics," she added. "Your sexist comments won't stop us."

After McKenna’s Tweet, Ritz wrote on Twitter: "I apologize for the use of Barbie, it is not reflective of the role the Minister plays."

Ritz, who represents the Saskatchewan riding of Battlefords—Lloydminster, announced his intention to resign in August, and said he wouldn’t be returning to his seat in the House of Commons this fall.

Resigning seat Oct. 2

On Wednesday, Ritz's Parliament Hill office confirmed that he sent a letter of resignation to the Speaker of the House of Commons shortly after announcing he would be resigning, indicating his intent to vacate his seat, effective Oct. 2.

Once an MP files their letter of resignation, or announces orally in the Commons, the Speaker of the House will announce a vacancy in the House, and a letter is sent to Elections Canada. That starts the clock on calling a byelection.

Until an MP's resignation is formalized, he or she remains on the payroll, said Heather Bradley, spokesperson for the Speaker of the House.

In August, when asked by CTV News when he would be notifying the House of Commons, Ritz said his letter to the Speaker was "in process."

"It takes time to wind down offices and pack up and all those things," Ritz said.

In the August interview, Ritz acknowledged that his tenure wasn’t without political missteps.

"The things I shouldn’t have said. That’s a pretty long list depending on who you talk to," said Ritz.