The Russian government has approved a draft agreement with Egypt which would allow the two countries to use each other’s airspace and airbases. The agreement is yet to be negotiated with Cairo.

The draft, which was prepared by the defense ministry and agreed to by the foreign ministry, has been approved by Prime Minister Dmitry Medvedev, a PM decree published Thursday by a Russian government legal paperwork portal shows. The two ministries were instructed by the chair of the government to negotiate and sign the agreement with their Egyptian counterparts.

The agreement would cover not only fighter jets and bombers, but also airborne radar pickets and military transport planes carrying hazardous cargo, the document says. The mutual use document will last for five years, with prolongation possible.

READ MORE: Russian weapons sales to Middle East soar

The news comes as Russian Defense Minister Sergey Shoigu visits Cairo. The Egyptian government has decided to expand defense ties with Russia. In recent months, the two nations have signed several arms contracts for Russian-made MiG-29 fighter jets, Ka-52 helicopters, and other weapons.

Historically, Egypt has been a key US ally in North Africa and a recipient of billions of dollars in military and economic aid – the second-largest after Israel. But relations between the two countries have somewhat soured in recent years. Some American officials cheered the 2011 overthrow of President Hosni Mubarak in a wave of mass protests. However his successor, Muslim Brotherhood leader Mohamed Morsi, was in his turn overthrown in a 2013 military coup.

Egypt’s current government of President Abdel Fattah el-Sisi, a retired general, has been drifting apart from Washington. In August, Cairo criticized the US for its decision to withhold $195 million in military aid and cut $96 million in other aid, which Washington justified by human rights violations in Egypt. The move resembled the policies of the Obama administration and came in contrast to President Donald Trump’s intention to reboot relations with Egypt which he expressed after meeting President Sisi in April, three months after taking office.