Speculations had started to mount that Tottenham Hotspurs were considering Ten Hag as a replacement for Jose Mourinho, who sacked last week after 17 months in charge.
But the Eredivisie leaders have moved swiftly to tie down the former Utrecht boss.
Ten Haag joined Ajax in December 2017 and has won one Eredivisie title while they are one win away from lifting this season’s title with four games left. Ajax were leading the table last season when the league was called off because of the coronavirus pandemic.
The 51-year-old led Ajax to the semi-finals of the UEFA Champions League in the 2018/2019 season.
The Amsterdam club confirmed in a statement on their website: "Ajax has reached an agreement with Erik ten Hag for the extension of his contract which previously ran until June 30, 2022. The new agreement will take effect on July 1, 2021 and will run until June 30, 2023."
"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."
"Getting somewhere is one thing, staying somewhere is another. Ajax is back on the map internationally," Ten Hag added.
"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."