In a dramatic shuffle amid a shareholder revolt, embattled BlackBerry maker Research in Motion (RIMM) announced over the weekend that co-CEOs Mike Lazaridis and Jim Balsillie are stepping down.

The surprise resignations leave the keys of the $9 billion Canadian company in the hands of insider Thorston Heins, previously its chief operating officer.

While Lazaridis and Balsillie will remain board members and large stock owners, their departure from the C-Suite could open the door to more dramatic changes that shareholders have been calling for, including the sale of part or the entire company.

Slammed by increased competition from Apple’s (AAPL) iPhone and Google’s (GOOG) Android system, RIM has continued to lose market share in the smartphone market it helped create.

Shareholders initially cheered the surprise Sunday night announcement, bidding RIM’s stock higher. However, RIM shares, which plummeted about 75% last year, reversed course and were recently off 4.24% to $16.28 ahead of Monday’s open.

Lazaridis, who co-founded RIM in 1984, and Balsillie insisted they weren’t forced out of their CEO posts. Instead, they said they approached the board about making the change.

“There comes a time in the growth of every successful company when the founders recognize the need to pass the baton to new leadership. Jim and I went to the board and told them that we thought that time was now,” Lazaridis said in a statement.

It’s not clear if the management changes will clear the path for an outright sale of RIM. Last week Samsung denied reports it was interested in acquiring the Canadian company.

“There is no intent to put the company up for sale,” a person familiar with the matter told The Wall Street Journal.

Lazaridis, who said he plans to buy another $50 million of RIM shares, said it was a good time to make the transition because the PlayBook 2.0 tablet device is set to ship in February, while BlackBerry 10 is expected to go on sale later this year.

Lazaridis was named vice chairman while RIM also appointed Barbara Stymiest, who has been on the board since 2007, as an independent chairman of the board.

“I agree this is the right time to pass the baton to new leadership, and I have complete confidence in Thorsten, the management team and the company," said Balsillie.

After joining RIM in 2007 from Siemens Communications, Heins served as senior vice president for hardware engineering and then last August became chief operating officer for product and sales.

"RIM earned its reputation by focusing relentlessly on the customer and delivering unique mobile communications solutions,” Heins said. “We intend to build on this heritage to expand BlackBerry's leadership position."

RIM also tapped Prem Watsa, CEO of shareholder Fairfax Financial Holdings, as a new board member.

In the wake of the management shuffle, Deutsche Bank analysts upgraded RIM to “hold,” while UBS analysts said the move is “a small step in the right direction,” according to Dow Jones Newswires.

Follow Matt Egan on Twitter @MattMEgan5