Civilians flee their hometown of Ramadi, the capital of Iraq's Anbar province, 115 kilometers (70 miles) west of Baghdad, Monday, May 18. Islamic State militants searched door-to-door for policemen and pro-government fighters and threw bodies in the Euphrates River in a bloody purge Monday after capturing the strategic city of Ramadi, their biggest victory since overrunning much of northern and western Iraq last year. (AP Photo)

BAGHDAD (AP) — Iraqi forces and allied Sunni tribesmen repelled an Islamic State attack May 18, on a town west of Baghdad, a tribal leader said Tuesday, as the government renewed its commitment to arm anti-militant Sunni tribes following the loss of the key city of Ramadi.

IS militants routed Iraqi troops and seized Ramadi, the Anbar provincial capital, over the weekend in their most significant advance since a U.S.-led coalition began airstrikes against the extremists last summer.

The Cabinet said Tuesday that the Sunni tribesmen in Anbar province would be armed in coordination with the local government. The move is apparently aimed at winning the Sunnis in embattled Anbar ahead of decisive offensive to retake Ramadi.

Islamic State militants launched an attack shortly before midnight Monday to try and capture the town of Khaldiya, which lies between Fallujah and Ramadi, Sheikh Rafie al-Fahdawi said. The extremists first captured a small village outside Khaldiya, he said, adding that no troops or tribal fighters were killed in the clashes.

The loss of Ramadi prompted Prime Minister Haider al-Abadi to order Shiite militias to prepare to go into the restive Sunni province following a request from the local government and some tribes.

The paramilitary forces, known as Popular Mobilization Units, played a major role in dislodging IS militants from the northern city of Tikrit last month and rolling back the extremists elsewhere in the country.

But rights groups have accused the militiamen of carrying out revenge attacks against Sunnis and of looting and destroying property. Militia leaders have denied the allegations.

On Monday, the Islamic State militants searched door-to-door for policemen and pro-government fighters in Ramadi and threw bodies in the Euphrates River in a bloody purge. Officials put the number of people killed since Friday at least 500, including civilians and security forces.

Enlisting the help of Anbar’s tribes was critical to the success of U.S. efforts to stabilize Iraq in the latter stages of the Iraq war in 2007-2008. After the withdrawal of U.S. troops, the tribal leaders have grown disillusioned with the Shiite-dominated government in Baghdad and claimed that Sunnis are receiving second-class treatment.

Till now, the Baghdad government has been reluctant to provide weapons to Sunni tribes due to the lack of mutual trust. But, it seems that the fall of Ramadi and the stunning collapse of the security forces have put pressure on the Iraqi prime minister to seek the help of the natives who once played a key role in defeating the insurgents in Anbar.

Also, the government is planning to recruit more forces in order to make up for the soldiers who deserted their positions during the recent fighting in Anbar, according to a statement posted on al-Abadi’s official website.

“Severe punishment will be done on those who failed to carry out their duties during the Ramadi battle,” the statement said.

Also Tuesday, Iraq’s Defense Ministry said in a statement it rescued a number of soldiers stranded inside Ramadi, releasing a video for two helicopters landing in an open area as several soldiers were rushing to them.

Later, the soldiers are seen disembarking from a helicopter and hugging and kissing one another at the base. The statement didn’t give details on when the rescue operation happened and the number of the soldiers.

A military official said the operation took place Monday and put the number of the rescued soldiers at 28. The official spoke on condition of anonymity as he was not authorized to release information to make statement.