BAGHDAD (Reuters) - Iraq has reached a $500 million agreement with Kuwait to resolve a standoff over Gulf War-era debts that had prevented Iraqi Airways from flying to destinations in the West, an aide to Prime Minister Nuri al-Maliki said on Wednesday.

Under the deal, Iraq will pay Kuwait $300 million in cash and will invest another $200 million in a joint Iraqi-Kuwaiti airline venture, Maliki's media adviser Ali al-Moussawi told Reuters by telephone from Kuwait where Maliki was on a visit.

In return, Kuwait would lift legal actions against Iraqi Airways, he said. In 2010 Kuwaiti lawyers tried to seize an Iraqi Airways plane on its first flight to London.

The issue of Iraqi Airways debts is one part of a long-running dispute between Iraq and Kuwait over billions of dollars of reparations dating back to Iraqi leader Saddam Hussein's invasion of Kuwait in 1990-91.

(Reporting by Suadad al-Salhy; Writing by Peter Graff; Editing by David Holmes)