Guehi, who has two years left on his contract, was the target of four unsuccessful bids from Newcastle, including a recent offer believed to be worth up to £65m with add-ons.
The South London club already sold Joachim Andersen to Fulham, so losing Guehi as well would have created a major problem for them in defence.
Newcastle are expected to explore other options before the window closes at 11pm tonight, but they face a race against the clock to finalize a deal.
Glasner glad to bring an end to Guehi transfer saga
Palace boss Oliver Glasner confirmed in his pre-match press conference today that Guehi would be staying at the club for the foreseeable future.
"Yes I can confirm," But I was never really in doubt. Congratulations to our owners because they didn't give in especially after the transfer of Joachim Andersen.
"Thank you to Marc, he was always open with me. All the rumours didn't influence his performances.
"He was not pushing to leave Crystal Palace and for me that is the most important thing."
Guehi has been with Palace since his £18m transfer from Chelsea in 2021 and is expected to wear the captain's armband for the 2024-25 season.
The 24-year-old England international made 29 appearances for the Eagles last season, helping them finish 10th in the Premier League, and has started all three of their games so far this season.
Deadline day deals still expected at Selhurst Park
Crystal Palace are anticipated to finalise deals for Eddie Nketiah from Arsenal and Maxence Lacroix from Wolfsburg before the deadline.
Nketiah is expected to cost the Eagles around £30m, which includes £25m upfront with £5m in add-ons, and the deal is believed to be in the final stages of confirmation.
However, even if Nketiah and Lacroix arrive at Selhurst Park today, Glasner confirmed that neither will be available for the match against Chelsea on Sunday.
He said: "No new player will be available for Sunday but we trust in all the players that are here."