ADDIS ABABA, Ethiopia (AP) — Ethiopia's parliament on Thursday ratified an accord that replaces colonial-era deals that awarded Egypt and Sudan the majority of the world's longest river.

The vote comes amid a bout of verbal jousting between Ethiopia and Egypt after Ethiopia last month started to divert Nile waters for a massive $4.2 billion hydro-electric dam dubbed the Grand Ethiopian Renaissance Dam.

Ethiopia's growing economy frequently suffers from power cuts and needs more electrical capacity. But Egypt fears the dam will mean a diminished share of the Nile, which provides almost all of the desert nation's water needs.

Egyptian politicians have suggested attacks against Ethiopia to sabotage the dam, and Egyptian President Mohammed Morsi on Monday warned that "all options are open" to challenge Ethiopia's Nile project.

Ethiopian Prime Minister Hailemariam Desalegn responded Tuesday, forcefully vowing "nothing" and "no one" will stop the dam's construction. He downplayed the prospect of conflict, saying Egypt leaders won't go to war unless they "go mad."

African Union head Nkosazana Dlamini Zuma on Wednesday urged dialogue and cooperation between Ethiopia, Egypt and Sudan.

A 10-person Egypt-Sudan-Ethiopia experts panel concluded that the dam will not "significantly affect" water flow to Egypt and Sudan, according to Ethiopian officials. Sudan said it accepts the outcome of the finding and this week announced that it supports Ethiopia's project.

Ethiopia's 547-member parliament unanimously endorsed the new Nile River Cooperative Framework Agreement, an accord already signed by five other Nile River countries.

The accord, sometimes referred to as the Entebbe Agreement, is the product of decade-long negotiations. It was conceived to replace the 1929 treaty written by Britain that awarded Egypt veto power over upstream countries' Nile projects. Sudan and Egypt signed a deal in 1959 splitting the Nile waters between them without giving other countries consideration.

The new cooperative agreement — signed by Ethiopia, Rwanda, Tanzania, Uganda, Kenya and Burundi — aims to establish a commission to oversee Nile projects. Congo and South Sudan, which succeeded from Sudan in 2011, have announced plans to join the new pact. Eritrea is participating as an observer in the 10-nation Nile Basin Initiative.

Egypt has previously said that it accepts most of the new agreement. But it opposes a clause saying member countries would work to ensure "not to significantly affect the water security of any other Nile Basin State." Egypt wanted the clause to say countries would not "adversely affect the water security and current uses and rights of any other Nile" states.

Ethiopian Minister of Water and Energy Alemayehu Tegenu told parliament that Ethiopia made two bold decisions concerning the dam. The first, he said, was to postpone ratification of the agreement by a year to accommodate Egypt's request for time until an elected government was in place.

"The second one was to let experts, including from Egypt and Sudan, inspect our Renaissance Dam," he said. "No other country does this but we did it in cooperation and friendly spirit. But we are seeing how our good intentions are being responded to. We can no longer wait. We need to go ahead with the ratification."

After ratifying the legislation, lawmakers called on the other five signatory countries to follow suit.

Ethiopia's Renaissance Dam has been under construction for two years on the Blue Nile River in Ethiopia's Benishangul-Gumuz region near Sudan.