Liberal MP David McGuinty has stepped down as the party’s natural resources critic after he suggested some Conservative MPs are “shills” for the oil industry and “should go back to Alberta.”

McGuinty offered his resignation to interim Liberal leader Bob Rae Wednesday evening, hours after Rae himself apologized for the remarks.

In a written statement, McGuinty also apologized.

"I would like to unreservedly and unequivocally apologize for comments which I made with respect to parliamentary colleagues from the province of Alberta," McGuinty said.

“My words in no way reflect the views of my party or leader and I offer my apology to them, as well as to my colleagues from Alberta.

"I hold all parliamentarians in high esteem and I regret my choice of words, as I can understand the offence they have caused."

The Liberals were trying to contain a story that threatened to alienate voters just days before a byelection in Calgary.

Rae bluntly stated Wednesday that McGuinty’s comments could hurt the party’s chances for an upset in Calgary Centre, where polls show Liberal candidate Harvey Locke running a close second to Conservative candidate Joan Crockatt. Calgary Centre has been a Tory riding for more than 40 years.

"Obviously, it's not helpful," Rae said after the party’s caucus meeting.

"That's why I'm saying, unreservedly and without qualification, I apologize. It doesn't reflect my views, it doesn't reflect my approach to this issue, it doesn't reflect the way in which I would address it or describe it, it doesn't reflect my view of how MPs do their job ... I think it was a mistake."

Rae said McGuinty’s comments came out the wrong way, as he tried to express frustration at trying to get the committee to look at energy from a national perspective.

McGuinty made the comments in question on Tuesday, after the Commons natural resources committee met to discuss a study on energy innovation.

When speaking to a reporter outside the committee room, McGuinty accused Conservative MPs from Alberta of being “shills” for the province’s oil sands.

"They really should go back to Alberta and either run for municipal council in a city that's deeply affected by the oil sands business or go run for the Alberta legislature," McGuinty said.

Prime Minister Stephen Harper denounced McGuinty’s remarks during question period in the House of Commons Wednesday, which spurred cheers from Conservative MPs.

"I find it shameful -- I guess not surprising, but shameful -- that 30 years after the National Energy Program, these anti-Alberta attitudes are so close to the surface in the Liberal party," Harper said.

Michelle Rempel, a Conservative MP from Alberta, said Wednesday she appreciated McGuinty’s apology, but said his remarks are indicative of the Liberals’ feelings toward the west.

“I just don’t understand why at the heart of the policy from the opposition it is western alienation,” Rempel told CTV’s Power Play Wednesday evening. “It’s a lack of respect for the contributions from people in the province, the fact that our industries within Alberta generate jobs and growth for the entire economy. I am proud to stand up for that.”

Rempel said she hopes McGuinty will also deliver his apology in the House.

Liberal leadership hopeful Justin Trudeau has spent considerable time in Alberta in recent months and has distanced himself from his father’s National Energy Policy, which still angers many Albertans.

In Alberta Tuesday to campaign for Locke and tout his own leadership bid, the younger Trudeau said that his entire campaign has been about bringing people together, about not pitting region against region.”

With files from The Canadian Press