Apple Inc Chief Executive Tim Cook on Monday replaced the heads of its software and retail units in the company's most sweeping executive shake-up in a decade following embarrassing problems with its new mapping program and unpopular store-related decisions.

Software chief Scott Forstall, who oversaw the launch of the flawed mapping software and much criticized Siri voice-enabled assistant, will leave Apple next year and serve as an advisor to Cook in the meantime.

Forstall, seen as a polarizing figure inside Apple, had been billed as one of the future candidates to take the top job at Apple. He was the executive behind the panned Apple Maps app that the company announced with much fanfare in summer.

The moves, which come a little more than a year into Cook's tenure as CEO, were described by Apple as a way to increase "collaboration" across its hardware, software and services business.

"These changes show that Tim Cook is stamping his authority on the business," Ben Wood, analyst with CCS Insight, said. "Perhaps disappointed with the Maps issues, Forstall became the scapegoat."

Critics of the maps debacle, which led Cook to apologize to customers, had been calling for Forstall's head. "Does Apple have a Scott Forstall problem?" Fortune editor Philip Elmer Dewitt wrote on Sept 29.

The moves hand over substantially more responsibility to Cue, the head of Internet Software and Services who helped create the iTunes music store and App Store. The 23-year Apple veteran already is in charge of Cloud services and will take on Apple Maps and Siri.

Apple said a search is underway for a new retail chief to replace John Browett and that the retail team would report directly to Cook. Browett had riled up the retail store staff when he decided to reduce the number of retail employees.

Browett took over as head of Apple's retail stores earlier this year, replacing Ron Johnson, who went on to become the CEO of JC Penney.

Last week Apple delivered a second straight quarter of disappointing financial results, and iPad sales fell short of Wall Street's targets, marring its record of consistently blowing past investors' expectations.

(Reporting by Alexei Oreskovic; Editing by Richard Chang)