LONDON — After striking a last-minute deal with European Union leaders last week to keep withdrawal talks going, Prime Minister Theresa May of Britain on Monday battled to sell her agreement at home, chiefly by putting out fires ignited by two members of her cabinet.

In Parliament, Mrs. May walked a political tightrope. She needs to reassure continental European governments that she is bargaining in good faith, but without alienating her hard-line supporters who fear she is making so many concessions that Britain will end up withdrawing in name only.

“There is, I believe, a new sense of optimism now in the talks,” Mrs. May told lawmakers. She promised a partnership with the European Union “which can deliver prosperity and security for all our people, for generations to come, that will be good for those who had supported and opposed Brexit.”

On Friday, Mrs. May reached a preliminary accord intended to allow stalled talks on Britain’s withdrawal, known as Brexit, to move on to a new phase that aims to negotiate future trade ties, and a crucial transitional period to cover the period immediately after Britain quits, in March 2019.