BERLIN, July 19 (Reuters) - Iraqi Prime Minister Nuri al-Maliki told a German magazine he supported prospective U.S. Democratic presidential candidate Barack Obama's proposal that U.S. troops should leave Iraq within 16 months.

In an interview with Der Spiegel released on Saturday, Maliki said he wanted U.S. troops to withdraw from Iraq as soon as possible.

"U.S. presidential candidate Barack Obama talks about 16 months. That, we think, would be the right timeframe for a withdrawal, with the possibility of slight changes."

It is the first time he has backed the withdrawal timetable put forward by Obama, who is visiting Afghanistan and us set to go to Iraq as part of a tour of Europe and the Middle East.

Obama has called for a shift away from a "single-minded" focus on Iraq and wants to pull out troops within 16 months, instead adding U.S. soldiers to Afghanistan.

Asked if he supported Obama's ideas more than those of John McCain, Republican presidential hopeful, Maliki said he did not want to recommend who people should vote for.

"Whoever is thinking about the shorter term is closer to reality. Artificially extending the stay of U.S. troops would cause problems."

Maliki, who is due to visit Germany this week, has suggested a timetable should be set for a U.S. withdrawal but U.S. officials have been more cautious, despite an improving security situation.

The White House said on Friday President George W. Bush and Maliki had agreed that a security deal under negotiation should set a "time horizon" for meeting "aspirational goals" for reducing U.S. forces in Iraq.

"The Americans have found it difficult to agree on a concrete timetable for the exit because it seems like an admission of defeat to them. But it isn't," Maliki told Der Spiegel.

Some five years after the U.S.-led invasion, there are still some 146,000 U.S. soldiers in Iraq. (Reporting by Madeline Chambers; Editing by Jon Boyle)