CAIRO - Arab media is reporting that Egypt and Russia are on the verge of signing a military cooperation agreement that would allow each side to use the other's air space and air bases for a period of five years. Russian media reported that Prime Minister Dmitry Medvedev has endorsed the draft agreement crafted by the defense ministry.

Egypt's red carpet welcome Wednesday for visiting Russian Defense Minister Sergei Shoigu has set in motion a military rapprochement between Cairo and Moscow, after months of hesitation, and more than 45 years of hostility following former Egyptian President Anwar Sadat's expulsion of Soviet military advisers from the country in 1972.

Russian Prime Minister Dmitry Medvedev signed the draft deal with Egypt, inked by Shoigu, which will allow each side to use the other's military facilities and air space for a period of five years. Russian military forces have already reportedly used Egyptian facilities for operations inside Libya in recent months, according to Arab media.

Russian Defense Minister Sergei Shoigu speaks at a FILE - Russian Defense Minister Sergei Shoigu. FILE - Russian Defense Minister Sergei Shoigu.

Defense Minister Shoigu applauded the warming relations between both countries during his visit to Cairo.

He says that efforts are being made to step up military and technical cooperation between Egypt and Russia, bolstering the capabilities of Egypt's armed forces and police, which bear the brunt of the burden in the war against terrorism. He noted that improving relations between the two sides is coupled with an increasing volume of bilateral contracts for Russian defense enterprises.

The warming of military ties between the two countries comes after a spate of terror attacks in Egypt, including a gruesome massacre of worshipers in a north Sinai mosque last Friday, which left more than 300 people dead. Islamic militants also attacked Egyptian security forces outside Cairo in October, killing and wounding a few dozen.

View of the Rawda mosque, roughly 40 kilometers we View of the Rawda mosque, roughly 40 kilometers west of the North Sinai capital of El-Arish, after a gun and bombing attack, on Nov. 24, 2017. View of the Rawda mosque, roughly 40 kilometers west of the North Sinai capital of El-Arish, after a gun and bombing attack, on Nov. 24, 2017.

Egyptian President Abdel Fattah el-Sissi has accused unspecified countries of being behind recent terror attacks both in the Sinai and outside Cairo.

He says outside parties are helping the terrorists, supplying them with arms, money, and fighting men, in an effort to seize control of the country and destroy Egypt's role in the region.

Egyptian media has specifically accused Qatar and Turkey of supporting the terrorists. Both countries deny the charges.

Hilal Khashan, who teaches political science at the American University of Beirut, tells VOA that President Sissi is eager to receive Russian help in defeating militants in the Sinai, since his own military has not been extremely successful.

"A few months ago, Sissi asked Putin to help him to crush the ISIS uprising in the northern Sinai [based on] the success of the Russian air force in eliminating the radical rebels in Syria, namely ISIS and (Jabhat) al Nusra, and he reiterated his request immediately after the massacre at al Rawda mosque [in the northern Sinai town of Bir al Abed]."

Khashan says he does not think Israel will object to the deployment of Russian air power in the Sinai, since Israel appears to have good working relations with Russia in Syria. He also says relations between Egypt and the U.S. will not be seriously affected by the developing relations with Russia. The U.S. gives Egypt $1.8 billion annually, mostly in the form of military aid.