Ontario MP Leona Alleslev is crossing the floor from the Liberals to join the Conservative party caucus — the first such loss for the governing party since the last election.

The floor crossing is a coup for the opposition Tories, who are counting on a breakthrough in suburban Toronto-area ridings like the one held by Alleslev to win them the next federal election.

While Alleslev said Monday she had been thinking about leaving the party for "a while," her Twitter activity over the summer betrays nothing of her dissatisfaction.

Leona Alleslev, the MP for Aurora–Oak Ridges–Richmond Hill announces that she is leaving the government benches to sit in opposition. 2:37

Conservative Leader Andrew Scheer said Monday he and Alleslev have been in discussions about a floor-crossing for a "a few weeks" — meaning the MP held talks with her former political foe only a short time after hosting Prime Minister Justin Trudeau in her riding for an event that celebrated Liberal accomplishments since forming government in 2015.

In a July 20 tweet, Alleslev thanked the prime minister for visiting her Aurora riding and said she looked forward to carrying the Liberal banner in the next campaign.

Tonight, Liberals from across <a href="https://twitter.com/hashtag/YorkRegion?src=hash&ref_src=twsrc%5Etfw">#YorkRegion</a> welcomed <a href="https://twitter.com/JustinTrudeau?ref_src=twsrc%5Etfw">@JustinTrudeau</a> to <a href="https://twitter.com/hashtag/Aurora?src=hash&ref_src=twsrc%5Etfw">#Aurora</a> to celebrate all that we have accomplished since forming government in 2015. Thank you to everyone who joined us, I’m proud to be part of this team as we head into 2019! <a href="https://t.co/rFch1feUnp">pic.twitter.com/rFch1feUnp</a> —@LeonaAlleslev

Alleslev explained away her shifting loyalties Monday by saying the Liberal party has not adequately addressed some "foundational challenges" facing Canada. She cited the government's handling of the economy, tax reform, foreign affairs and trading relationships, and what she calls inadequate military spending, as the reasons motivating her to jump from the government bench to the Tories.

Alleslev, a graduate of the Royal Military College and a former captain in the Royal Canadian Air Force, held positions at the Department of National Defence, IBM and aerospace manufacturer Bombardier before seeking the Liberal nomination for the Aurora-Oak Ridges-Richmond Hill riding in 2014.

"My attempts to raise my concerns with this government were met with silence," Alleslev said in a speech in the House of Commons announcing her move. "It's my duty to stand and be counted. Our country is at risk. The government must be challenged openly and publicly.

"To my Liberal colleagues, thank you. But my oath is to country, not party and my sacred obligation is to serve my constituents."

This is the first floor crossing the Liberals have faced since Trudeau assumed leadership of the party in 2014.

'That final decision doesn't happen until I was in the moment and I stood up,' says Leona Alleslev. 10:50

Later Monday, in conversation with Paul Wells of Maclean's magazine, Trudeau said he remembered Alleslev as being a thoughtful candidate who knew she was in a riding that leaned Conservative but remained excited about jumping on board the Liberal team.

"I wish her the best in her new choices, and you know, that's something that happens from time to time in politics. It's not great but it's also not the be all and end all," Trudeau told Wells.

"One team lost a member and it went to the other side. It can be an indicator of larger things. It can be just what it is and we'll just stay focused on the things that we're focused on doing."

Asked if he thought other members of his caucus might be considering taking the same path across the aisle, Trudeau said he "certainly" didn't think so, because his caucus members have given him the impression they are fired up and ready to get things done.

Prime Minister Justin Trudeau says losing Alleslev is not the 'be all and end all.' 1:36

Alleslev's departure caps off a summer of disruptive developments for the Liberal government, including protracted NAFTA negotiations, a surprising Federal Court of Appeal decision on the Trans Mountain expansion project (which halted further construction pending some court-ordered fixes by Ottawa) and Alberta Premier Rachel Notley's subsequent decision to pull Alberta out of the national climate plan.

Alleslev previously served as a parliamentary secretary to the minister of Public Services and Procurement between November 2015 and January 2017. She was replaced by Quebec MP Steven MacKinnon, a former national director of the Liberal Party.

Alleslev narrowly defeated former Conservative MP Costas Menegakis — by just 1,093 votes, or 2.2 percentage points — to secure the riding for the Liberals.

Menegakis, who already had been nominated to run again for the Conservatives, tweeted Monday he will stand aside in favour of Alleslev and instead seek the nomination for the neighbouring riding of Richmond Hill.

Looking forward to working with Conservative colleagues who are unafraid to do the real work to tackle priorities of our time. —@LeonaAlleslev

Speaking to reporters in the foyer of Commons, Scheer said he was "extremely proud" to welcome Alleslev into the Conservative fold. He said that, like many Canadians who voted for Trudeau in the last election, Alleslev now realizes Trudeau is not equipped to deal with the "challenges of our time."

"If, like Leona, you supported Justin Trudeau and the Liberals in the last election and you're frustrated or even angry with the ineffective leadership, know this: you are both welcome and needed in the Conservative Party of Canada. We're going to keep adding to our team," he said.

Scheer said Alleslev will be appointed the party's critic for global security.

Tough summer for Liberals

In a subsequent interview with CBC's Power & Politics, Alleslev tried to downplay her July 20 tweet praising the Liberal government, saying she was simply welcoming Trudeau to her riding — as she would any prime minister. By "proud to be part of the team," she said, she merely meant to say she was proud to "be part of the country."

"It was really just to welcome the prime minister to our riding. He should be out in the country and we should always be proud to have, as constituents, the prime minister in our riding," she said.

Scheer said that while Alleslev had been talking to the Conservatives about crossing the floor for some time, nothing was guaranteed until Alleslev stood in the House Monday to announce the switch.

"We have a lot of points in common, but nothing was promised, nothing was guaranteed," he said.

Braeden Caley, a Liberal Party spokesperson, confirmed Alleslev had already met her "community engagement" targets — groundwork every incumbent Liberal MP must do before they can secure the nomination and run again under the party's banner in the 2019 election.

Volunteers in her area met door-knocking requirements more than a month ago, Caley said in an email to CBC News, confirming volunteers had knocked on over 3,500 doors in the riding and/or made 5,000 phone calls with the community.

"The Liberal Electoral District Association in Aurora-Oak Ridges-Richmond Hill has some of the strongest volunteer numbers of any team in Ontario, and that will certainly serve them well in the months ahead," Caley said. "Over 54,000 Ontarians have signed up as new Liberals in the last 2 years alone, a strong vote of confidence in Justin Trudeau's positive progress to deliver real change."

Alleslev did not attend the Liberal caucus retreat in Saskatoon last week as she was travelling in Europe on parliamentary business.

The Conservatives picked off another Liberal seat earlier this year after winning a Quebec by-election in a riding held by a retiring Liberal MP. However, the Liberals have turned two Tory-held seats red since the last election, in B.C. and Quebec respectively.

While the Liberals consistently have outperformed the opposition Conservatives in national opinion polls, the Tories have a financial edge and are outpacing the Liberals in nominating candidates for the next campaign. (The Liberals maintain their fundraising performance has been roughly equal to that of the Conservatives, who spend more money to collect their donations.)

Historically, about two-thirds of MPs who cross the floor and seek re-election under a new party's banner have been successful, bringing a boost in support for their new party in the vast majority of cases.