By Suadad al-Salhy

BAGHDAD (Reuters) - Iraq has signed a contract to buy 18 Lockheed Martin F-16 warplanes to bolster its air force, an adviser to Prime Minister Nuri al-Maliki said on Monday.

The value of the deal was not immediately known, but a senior U.S. military official said recently that the offer on the table for the Iraqi government was valued at "roughly $3 billion."

Iraqi and U.S. military officials have said strengthening the air force is one of Baghdad's top priorities as U.S. troops prepare to leave by December 31, more than eight years after the invasion that ousted Saddam Hussein.

"The contract was signed ... and a part of the contract cost was sent to the bank account of the company," Maliki's media adviser, Ali al-Moussawi, said.

Iraq has long sought a combat jet for its rebuilt air force. The government delayed a planned purchase of F-16s in February to divert a $900 million down payment to its national food ration program to help quell street protests.

But Maliki said on July 30 that Iraq would buy 36 F-16s, double the number it had originally planned, to shore up its weak air defenses. The OPEC producer has found itself flush with cash this year, reaping windfall profits as the world oil price has remained above budget projections.

The two sides had been negotiating for the F-16 Block 52 export model with sophisticated avionics and weapons in a deal that included maintenance and training, a U.S. military official said.

Iraq relies on the U.S. military for air support as it rebuilds its forces and battles a stubborn Islamist insurgency. Washington and Baghdad are discussing whether to keep some U.S. troops or military trainers in Iraq beyond the year-end deadline.

Iraq's two airborne defense units, the Air Force and the Army Aviation Command have only 158 aircraft, including 89 helicopters and 69 airplanes, and about 7,500 personnel, according to U.S. figures.

It has three Cessna Caravan propeller planes equipped with Hellfire missiles but no combat jets, a U.S. military official said.

(Additional reporting and writing by Jim Loney; Editing by Tim Pearce)