After 20 years in politics, Foreign Affairs Minister John Baird told the House of Commons that it's time for him to step down.

Baird stood in the House on Tuesday morning and started his speech by recalling his early years in the Ontario legislature under then Premier Mike Harris.

"I was perhaps just a little naive. Driven by ideology, defined by partisanship, at the age of 25," Baird began.

Baird 20141118

John Baird was named foreign affairs minister in 2011, and has held the post longer and with more success than any of Stephen Harper's previous ministers in the role. (Adrian Wyld/Canadian Press)

Baird's Conservative colleagues teased him, responding with fake horror that the pugnacious MP displayed a partisan nature.

"I quickly learned though to make a difference, to really make a difference, you can't be defined by partisanship, nor by ideology. You need instead to be defined by your values," he said.

Worked with opposition critics

Baird's resignation as minister will take effect immediately and his resignation as MP, representing the riding of Ottawa West-Nepean, will take effect within days, prompting speculation he has a new job lined up.

Sources close to Baird say that after two decades in public office, it was simply time to seek other opportunities, and suggest any new job will be in the private sector, where his experience and profile will make him attractive.

Colleagues, rivals react to Baird resignation3:47

Baird was a popular MP, respected and liked by his opposition critics. They would frequently lock horns in the House or at committee but, away from the cameras, his opponents found a receptive ear.

New Democrat foreign affairs critic Paul Dewar, whose Ottawa Centre riding sits next to Baird's, and international development critic Hélène Laverdière, a former diplomat, were among the first to line up in the House on Tuesday to hug the departing minister.

Dewar applauded Baird for his work fighting discrimination against gays and lesbians around the world, and for his commitment to fighting sexual violence.

Baird found his best footing as minister of foreign affairs, Dewar said, praising him for co-operating with opposition MPs.

"As passionate as he can get, as partisan as he can get, and he can, he is also someone who reaches out. He is also someone who understands the importance of getting things done," Dewar said.

Part of Harper's inner circle

Liberal foreign affairs critic Marc Garneau called Baird someone who listens sincerely. He recalled Baird inviting him and Dewar to Iraq last fall to see the crisis in that country.

"That was a very important moment in foreign policy, and to have allowed us to join you I think demonstrated what is often lacking in this place, and that is a dropping of the gloves in the national interest and putting away partisanry," Garneau said to Baird in the House.

Baird's departure from cabinet, along with the resignation of Jim Flaherty a month before his death last year, mean two of Harper's most powerful ministers will have left the prime minister's inner circle in less than a year.

As foreign affairs minister, Baird has overseen a busy file, handling Canada's diplomatic response to the war in Libya, the crisis in Ukraine, the Palestinian push for statehood, the coalition mission in Iraq and, most recently, the case of jailed Canadian-Egyptian journalist Mohamed Fahmy.

He also took a hard line against the abuse of gays and lesbians around the world, and focused the Canadian government's attention on the issue of forced marriage.

Baird was nominated last March as the Conservative candidate in the newly created riding of Nepean for the next federal election, which must be held by Oct. 19 at the latest. He will no longer be the candidate.

Baird, 45, has been in politics most of his adult life. He was first elected as an MP in 2006 after a decade in provincial politics in Ontario, where he served in Mike Harris's cabinet.

A source close to Baird said he still supports the prime minister and will campaign for the party in the election.​

Will get pension earlier

Just before he rose in the House to a standing ovation Tuesday, Baird tweeted a photo showing him with Harper.

"After 20 years of public office, I'm optimistic about Canada's future, and about the next chapter in my life," Baird tweeted.

By not running in 2015, Baird also qualifies for his pension, under an old rule, at age 55. Parliament increased the qualifying age to 65 years old but that policy only covers those who are elected or re-elected in 2015.

After CBC News surprised many with early word of his departure Monday night, Twitter had both darts and laurels for the veteran Conservative as the news spread.

The CBC's Matthew Kupfer reported "surprise and shock" early Tuesday morning from the streets in Baird's west Ottawa riding. Constituents said that as both a provincial and federal representative, Baird was proactive for his community and he'd be missed.

One told CBC that if Baird is leaving to take on a prominent international role, it would be "good for Canada's reputation."

International Trade Minister Ed Fast will take over as interim foreign affairs minister, a move that sees Stephen Harper's office reach for its 2008 playbook: when former foreign affairs minister Maxime Bernier was forced to resign amid controversy, then Trade Minister David Emerson was assigned to cover the entire foreign affairs and international trade department on an interim basis. (Emerson's new responsibilities were confirmed in a cabinet shuffle a month later.)

John Baird resigns: Read our live blog

Mobile users, click here to read the ScribbleLive blog.

with files from CBC News