(REUTERS) -- Research In Motion's Mike Lazaridis and Jim Balsillie have resigned as co-CEOs and co-chairmen, handing the top job to an insider with four years at the struggling BlackBerry maker.

Thorsten Heins, a former Siemens executive who has risen steadily through RIM's upper management ranks since joining the Canadian company four years ago, took over as CEO on Saturday, RIM said.

The shift ends the two-decade partnership of Lazaridis and Balsillie atop a once-pioneering company that now struggles against Apple and Google.

(Reporting by Alastair Sharp; Editing by Frank McGurty and Janet Guttsman)