Two rockets were fired in the direction of the U.S. Embassy in Baghdad on Saturday, with one of them shot down by the U.S. military and the other missing the embassy compound, Fox News has confirmed.

The rocket that was shot down was hit by a U.S. C-RAM (counter rocket and mortar anti-missile) defense system, according to a U.S. defense official.

The embassy is located in the protected Green Zone area of the Iraqi capital city.

US TO KEEP TROOPS IN IRAQ FOR FORESEEABLE FUTURE, TOP COMMANDER SAYS

The rocket that missed the embassy area landed near the Grand Festivities Square area near the Green Zone, damaging two civilian vehicles, The Jerusalem Post reported.

Both rockets landed north of the Union III base, the headquarters of the U.S.-led coalition and Iraqi government forces opposing the Islamic State group, a defense source told Fox News. There were no immediate reports of casualties, the source said.

 The U.S. Embassy is seen from across the Tigris River in Baghdad, Iraq, Jan. 3, 2020. (Associated Press)

No group had yet claimed responsibility for the rocket fire, the report said.

The incident came ahead of an end-of-year deadline set by Iranian-backed militias for the U.S. to withdraw its forces from Iraq, according to the Post.

On Dec. 9, the top U.S. commander for the Middle East said the U.S. would keep the current 2,500 troops in Iraq for the foreseeable future, and he warned that he expected increasing attacks on U.S. and Iraqi personnel by Iranian-backed militias determined to get American forces out.

CLICK HERE TO GET THE FOX NEWS APP

Marine Gen. Frank McKenzie told The Associated Press at the Pentagon that despite the shift by U.S. forces to a non-combat role in Iraq, they would still provide air support and other military aid for Iraq's fight against the Islamic State group.

Groups aligned with Iran have vowed to seek revenge against the U.S. for a 2020 drone strike that resulted in the death of Iran's Gen. Qassem Soleimani and Iraqi military commander Abu Mahdi al-Muhandis, the AP reported.

In November, a drone targeted the home of Iraqi Prime Minister Mustafa al-Kadhimi in a failed assassination attempt.

Fox News’ Jennifer Griffin and The Associated Press contributed to this story.