Prime Minister David Cameron says the European Union must agree to "irreversible changes" that would redefine Britain's relationship with the bloc — and allow the U.K. to restrict benefits payments for migrants from other member states.

Britain will hold a referendum by the end of 2017 on whether to leave the 28-nation EU. Cameron says he wants to stay in, provided he can secure greater autonomy for the U.K.

Cameron outlined his demands Tuesday in a London speech and a letter to European Council President Donald Tusk.

He said Britain wants change in four areas, including protection for non-eurozone countries, less red tape and more power for national parliaments.

Most contentiously, Cameron said Britain wants to control migration by barring EU immigrants from claiming some benefits for four years.