Priti Patel has resigned as UK international development secretary amid controversy over her unauthorised meetings with Israeli officials.
She was ordered back from an official trip in Africa by the PM and summoned to Downing Street over the row.
In her resignation letter, Ms Patel said her actions "fell below the standards of transparency and openness that I have promoted and advocated".
The PM said her decision was "right" as "further details have come to light".
Ms Patel had apologised to Theresa May on Monday after unauthorised meetings in August with Israeli politicians - including prime minister Benjamin Netanyahu - came to light.
But it later emerged she had two further meetings without government officials present in September.
Ms Patel arrived at 10 Downing Street via the back door - after earlier flying back to the UK from Africa for her meeting with Mrs May - and she left some 45 minutes later.
She was accused of breaching the ministerial code, which sets out the standards of conduct expected of government ministers.
Her resignation from the cabinet is the second in seven days, after Sir Michael Fallon quit as defence secretary on Wednesday last week amid allegations about his behaviour.
In her letter to the PM, Ms Patel said: "While my actions were meant with the best of intentions, my actions also fell below the standards of transparency and openness that I have promoted and advocated.
"I offer a fulsome apology to you and to the government for what has happened and offer my resignation."
In her reply, Mrs May said: "Now that further details have come to light, it is right that you have decided to resign and adhere to the high standards of transparency and openness that you have advocated."
She added that Ms Patel should "take pride" in what had been achieved during her time as secretary of state.
The BBC's chief political correspondent Vicki Young said Theresa May "decided to give her colleague the dignity of resigning".
But she said the response from Mrs May was "interesting", saying: "It was clear from Theresa May that if she hadn't resigned, she would have been sacked."
Foreign Secretary Boris Johnson told the BBC: "Priti Patel has been a very good colleague and friend for a long time and a first class secretary of state for international development.
"It's been a real pleasure working with her and I'm sure she has a great future ahead of her."
Meanwhile, Labour's deputy leader Tom Watson has written to Mrs May over claims passed to him that Ms Patel met Foreign Office officials in Jerusalem, which he says makes it "impossible to sustain the claim that the FCO was not aware of Ms Patel's presence in Israel".
Mr Watson said he was "pleased" that Ms Patel had resigned as her undisclosed meetings were "a clear breach of the ministerial code, and of diplomatic protocol".
By Laura Kuenssberg, BBC political editor
It was precisely a week ago that I was summoned to the Ministry of Defence to ask Sir Michael Fallon why he was resigning.
Seven days on, for an unconnected reason, Theresa May has just lost another one of her ministers.
That time the resignation was rather differently handled - some private speculation through the day, then a discreet summoning to a quiet room in the department until one of the minister's team came to say: "Be ready, the secretary of state is resigning, we are finalising the letters between us and Number 10 right now."
This time, the process has been more like a pantomime, with speculation rife for nearly 24 hours that she was on her way out, no-one in government moving to quash it, leaving journalists, on the first day of parliament's recess, free to track Priti Patel's plane online then her journey back to Westminster.
Goodness knows what Ms Patel's Ugandan hosts, who were expecting her to visit today, make of it all.
Beyond today's palaver, though, her exit throws up problems for Mrs May.
It is never as simple as one out, one in.
Ms Patel was formally reprimanded in Downing Street on Monday, where she was asked to give details about a dozen meetings she had with Israeli officials while on holiday, which were not sanctioned by the Foreign Office.
She was then forced to correct the record earlier this week about the number of meetings that she had attended and when the Foreign Office had been notified about them.
The MP admitted she had been wrong to suggest to the Guardian that Foreign Secretary Boris Johnson knew of the trip in advance when he had only learnt about it while it was under way.
Who is Priti Patel?
- Elected as Conservative MP for Witham in May 2010
- Served as a Treasury minister from July 2014 to May 2015
- She then became employment minister from May 2015 to July 2016
- Appointed International Development Secretary in July 2016
- A longstanding Eurosceptic, she was a leading figure in the Vote Leave campaign during the EU referendum
Then, details of two other meetings emerged. Ms Patel met Israeli public security minister Gilad Erdan in Westminster on 7 September.
And on 18 September she met foreign ministry official Yuval Rotem in New York.
It is thought Lord Polak, honorary president of the Conservative Friends of Israel, was present at both meetings.
It is not yet clear whether or when Ms Patel had informed the prime minister about these meetings or of her plans to look into giving tax-payers' money to the Israeli military to treat wounded Syrian refugees in the Israeli-occupied Golan Heights region - a request that was turned down as "inappropriate" by officials.
In a further development on Wednesday the Israeli Haaretz newspaper reported that during August she visited an Israeli military field hospital in the Golan Heights - the UK, like other members of the international community, has never recognised Israeli control of the area seized from Syria in the 1967 Six-Day War.
In her letter to Ms Patel, the prime minister wrote: ''As you know the UK and Israel are close allies, and it is right that we should work closely together. But that must be done formally, and through official channels.
''That is why, when we met on Monday I was glad to accept your apology and welcomed your clarification about your trip to Israel over the summer. Now that further details have come to light it is right you have decided to resign.''