OTTAWA — Bruce Hyer has quit the federal New Democrats, electing to sit as an Independent member of Parliament, weeks after being at odds with his party about the end of the long-gun registry.

The decision by one of the party's northern Ontario MPs marks the second time this year the federal NDP has suffered a resignation from its caucus, the first being Lise St-Denis who now sits as a Liberal.

While murmurs and rumblings of a defection preceded that announcement, Hyer's resignation Monday was so abrupt that NDP leader Thomas Mulcair said he learned of the news two minutes before the daily question period kicked off in the afternoon.

And the departure came hours after the new NDP House leader, Nathan Cullen, spoke to reporters about the unity within the party's ranks behind Mulcair.

Hyer's decision to leave was precipitated by the NDP's stance on the long-gun registry, which conflicted with his own belief, and the fact he didn't receive a position in the party's shadow cabinet.

Hyer originally intended to make the decision public during a statement in the Commons, but his chance to speak was yanked at the last moment when the party caught wind of what he was going to say.

The Conservatives mocked the NDP during question period, suggesting New Democrat MPs couldn't speak freely on issues that mattered to them.

Hyer was one of two New Democrats to vote with the government to end the long-gun registry, a move for which he was disciplined. Mulcair said one of his first acts as leader of the party was to remove the punishments imposed on Hyer.

Hyer's seat in the Commons was empty during question period. His departure leaves the NDP with 101 seats.

"I've said very clearly to him . . . that there will be times when I'll have to impose a decision that is the collective decision of our caucus. Bruce refuses to live within that system," Mulcair told reporters after question period.

"You vote with your party and you vote with your caucus and there will come times when you have to impose that. Bruce refuses (to do) that and he's decided to step down."

In a statement on his website, Hyer said being a part of the three main parties requires members to follow "lockstep discipline with little room for meaningful public debate." In an interview, Hyer said he would be voting with the NDP most of the time and he would keep his NDP membership.

"Jack (Layton) was very good at balancing the party and the thoughts and needs of the MPs. Under Nycole (Turmel) it was a disaster," Hyer said.

"I really hope that Tom will be the next prime minister, but I hope him and party learn to be more small-D democratic and allow some flexibility."

First elected in 2008, Hyer was passed over recently for a position in the shadow cabinet in which three-quarters of the NDP caucus were given positions as either a critic or deputy critic, an exclusion that led Hyer to believe he wouldn't have a chance to speak much in the Comnons.