Turkish army rules out 'anti-Erdogan coup'

Turkish President Recep Tayyip Erdogan accompanied by his wife Emine walk down the stairs upon his arrival at Andrews Air Force Base, Md., Tuesday, March 29, 2016. Erdogan is in Washington to attend the Nuclear Security Summit. (AP Photo/Jose Luis Magana) (The Associated Press)

Turkish President Recep Tayyip Erdogan accompanied by his wife Emine walk down the stairs upon his arrival at Andrews Air Force Base, Md., Tuesday, March 29, 2016. Erdogan is in Washington to attend the Nuclear Security Summit. (AP Photo/Jose Luis Magana) (The Associated Press)

Turkish President Recep Tayyip Erdogan, accompanied by his wife Emine walk downstairs from a plane upon his arrival at Andrews Air Force Base, Md., Tuesday, March 29, 2016. Erdogan is in Washington to attend the Nuclear Security Summit. (AP Photo/Jose Luis Magana) (The Associated Press)

The Turkish army says it has no plans to stage a coup against President Recep Tayyip Erdogan and has threatened legal action against anyone who suggests otherwise.

The rare statement aims to squash speculation over the possibility of a military coup in Turkey as the president visits the United States. The military said on its website such "baseless news" was hurting morale in its ranks without naming specific publications.

The Turkish army, historically seen as a defender of secular principles, has ousted three elected governments and one prime minister.

The institution saw its power reduced through a series of measures after Erdogan came to power as prime minister in 2003. Now the country's president, Erdogan is due to return to Turkey on Sunday.