Ten Hag had been touted as one of Spurs' preferred candidates to be the long-term successor to Jose Mourinho, who was sacked by the north London club last week.
RB Leipzig had also been floated as a possible destination for Ten Hag after Julian Nagelsmann was confirmed as Bayern Munich's next head coach, but Jesse Marsch will take over at the Bundesliga club next season.
Ajax is a point away from retaining the Eredivisie crown it won in 2018-2019 as part of a domestic double under Ten Hag – it was top of the table when last season was abandoned because of the coronavirus pandemic – and ahead of Monday's (AEST) potentially celebratory home game against Emmen, the Amsterdam giant was handed a timely boost.
"We want to work on a successful and attractive Ajax,” Ten Hag told Ajax's official website after committing until June 2023. "I know what I have here and I know the people I work with here. I also know how we can take the next step with this team. I'm happy here."
Ten Hag memorably led Ajax to the semi-finals of the UEFA Champions League in 2018-2019, where it suffered a heartbreaking loss to Spurs.
Roma ended its UEFA Europa League involvement at the quarter-final stage this season, but the coach is keen to re-establish it as a continental force.
"Getting somewhere is one thing, staying somewhere is another. Ajax is back on the map internationally," Ten Hag said.
"We get the recognition we deserve for that, but we want even more. We want to go even higher and challenge the top clubs in Europe."
Ajax's website noted Ten Hag had received "serious offers from teams abroad" and director of football Marc Overmars is delighted to have extended terms that were set to expire in June 2022.
"I think it is very important for Erik that he sees what is possible with the team and that there is still room for growth," the former Arsenal winger said.