Ansu's previous deal was due to expire at the end of the season and sources told ESPN that his agent, Jorge Mendes, had fielded calls from some of Europe's biggest teams.
From Jan. 1, Ansu would have been free to speak to other clubs about a potential free transfer next summer, but sources add he made it clear to Barca it was his desire to stay at Camp Nou.
Barcelona were also keen to get Ansu, 18, to agree new terms quickly. The Spain international is seen as key to the club's future in the post-Lionel Messi era and has even inherited the No. 10 shirt previously worn by the Argentina star.
Sources also revealed that the player's new deal will include a staggered salary which increases each season. The release clause in the contract, meanwhile, has risen to a club-record €1bn, matching the figure included in the terms signed by young midfielder Pedri recently.
Ansu's previous contract -- which was negotiated by his ex-agent, Rodrigo Messi -- included an option to extend by two years, but there was confusion over whether Barca would be able to execute it unilaterally.
Various agents consulted by ESPN said they would not be able to as minors can only sign three-year deals. Sources at Barca, meanwhile, would not confirm if the clause had any value or not, but always stressed the aim is to reach a fresh agreement with Mendes.
Talks with Mendes have been ongoing for a while, but sources told ESPN there was a breakthrough earlier this week when the Portuguese agent met with Barca's director of football Mateu Alemany in Porto.
Ansu only returned from injury in September after 10 months on the sidelines with a knee injury but he has made an instant impact.
He first broke onto the scene in 2019, becoming the club's youngest debutant in 78 years when he featured in a 5-2 win against Betis aged 16 years and 298 days.
A week later, he became the club's youngest goalscorer in LaLiga when he netted against Osasuna, and in December of that year, his winning goal against Inter Milan made him the youngest scorer in the Champions League.
In total, he has now scored 15 goals in 47 appearances for Barca.
At international level, he committed to Spain, despite also being eligible to represent Guinea-Bissau and Portugal, and made his senior debut in September 2020 against Germany. He has one goal in four appearances for La Roja.