Social and economic impacts on communities will be considered when decisions are made on returning Murray-Darling water to the environment.
The amendment was one of dozens agreed to as the government's overhaul of the Murray-Darling Basin Plan passed the Senate on Thursday, with support from the Greens and crossbenchers.
The $13 billion plan aimed to return 450 gigalitres of water to the environment by June 2024 but that deadline will be moved to the end of 2027.
A deal with Victorian independent David Van led to the insertion of a clause ensuring the responsible minister considers the "social and economic impact of the program on communities in the Murray-Darling Basin" in deciding on water purchases.
The minister would have to report on matters taken into account when making decisions.
Environment Minister Tanya Plibersek said the government would start looking at voluntary water buybacks next year.
"This is an amazing day for the Australian environment, for the million square kilometres of inland Australia that these rivers sustain," she said.
ACT independent senator David Pocock struck a deal for an additional $20 million for the health and monitoring of the Upper Murrumbidgee.
Another $30 million will be in the contingency reserve for more water in the Upper Murrumbidgee during drought-like conditions.
Independent senator Lidia Thorpe gained support for an amendment to ensure the use and management of basin water resources takes into account the "spiritual, cultural, environmental, social and economic matters relevant to Indigenous people".
The laws would put in place a new agreement with all basin states except Victoria, which is opposed to more buybacks.
Many farmers and producers have come out against the new deal, warning their communities will suffer as a result of buybacks.
Thousands have rallied in basin communities over the past two weeks opposing water buybacks.
"The impacts will be felt by all Australians at the supermarket checkout," National Farmers' Federation president David Jochinke said.
Mr Jochinke said taking more water away from agricultural production through buybacks was a "kick in the guts" to basin communities.
But scientists have welcomed the plan.
"This bill is an important step forward for the long term health of the Murray Darling Basin," said Celine Steinfeld, from the Wentworth Group of Concerned Scientists.
Dr Steinfeld said water buybacks remain one of the best tools to ensure a healthy river system.
"The measures give greater guarantees that the health of the river and the river flows will improve."
The Greens struck a deal on a raft of amendments including an independent audit of water in the basin and $100 million for First Nations water and the Aboriginal Water Entitlements Program.
The federal opposition argues buybacks are not the best way to protect the river system because they hurt regional communities.
It wants more water-efficient infrastructure and updated modelling on flows.
"The only winners here are the states who get more time - and good for them," Nationals spokeswoman Perin Davey said.
"But at what cost to communities, to jobs and to taxpayers?"
Australian Associated Press