Egypt's Oil Minister Sherif Ismail (left) attends the Egypt Economic Development Conference in Sharm el-Sheikh, March 14, 2015. Ismail announced Thursday a new oil deal between Egypt and Saudi Arabia. Reuters/Amr Abdallah Dalsh

Egypt and Saudi Arabia have signed a $1.4 billion deal for Aramco, the Saudi state oil company, to supply Egypt with oil for three months, beginning in September, Egyptian Oil Minister Sherif Ismail said Thursday. The deal further cements the increasingly close relationship between Egypt and Saudi Arabia, both Sunni Arab states that have felt threatened by regional instability triggered by the rise of the Islamic State group and the recent international nuclear deal with Iran.

The two countries signed a pact at the end of July to step up their military and economic cooperation. Called the Cairo Declaration, the agreement called for joint investment in energy and transportation, as well as a new joint Arab military force.

“Egypt and Saudi Arabia are the two pillars of Arab national security, and together we can confront these challenges,” Egyptian President Abdel Fattah el-Sisi said at the time.

Saudi Arabia, along with the United Arab Emirates, has backed Egypt since 2013, when its military ousted Mohammed Morsi, a leader of the Muslim Brotherhood and the country's first democratically elected president after the fall of dictator Hosni Mubarak in 2011. Saudi Arabia in particular has helped shore up Egypt's lagging economy after Egypt's Western allies withdrew support following the coup. In the months following, it pledged to send billions of dollars in aid, along with other Gulf countries.

As part of the latest deal, Saudi Arabia will supply Egypt with 500,000 tons of diesel, 220,000 tons of heating oil and 150,000 tons of gasoline every month, Ismail said. Egypt has one year to pay Aramco, Reuters reported. Egypt's economy has lagged since 2011, as foreign investors and tourists fled amid political turmoil. In July, the country's domestic debt reached $261 billion.

Saudi Arabia, Kuwait, the UAE and Oman pledged in March to send $12.5 billion in aid to stimulate Egypt's economy and support investments there. Egypt also recently unveiled an expansion of the Suez Canal, which officials said would double the canal's traffic and more than double its revenue by 2023, although analysts were skeptical of those estimates.