LONDON — The European Union offered a proposal on Tuesday intended to keep Britain as a member of the bloc, setting out compromises on hot-button issues like immigration and setting up a referendum as early as this summer on whether the country wants to retain close ties to the Continent or go its own way.

The proposal, drafted by the European Council president, Donald Tusk, addressed all the issues that Prime Minister David Cameron had insisted be revisited if he was to campaign to keep Britain in the union. But it remained vague on some crucial points, and in any case was unlikely to sway those most committed to Britain’s exit from the bloc.

Mr. Cameron’s task in the months before the referendum is to rally enough supporters of continued membership and win over enough of those on the fence to avert a vote to leave, a choice that many predict could have global ramifications.

Written after weeks of diplomacy, the dense texts still need to be approved by leaders of the other 27 members of the bloc, who, along with Britain, will meet for a crucial summit meeting in Brussels this month. A deal there could pave the way for a British referendum as early as June.