Alpine's news release had not included any comments from Piastri. There has been speculation that the current F2 champion was working on a better deal with another team.
In Alpine's announcement, team principal Otmar Szafnauer said Piastri is "a bright and rare talent" who is "more than capable of taking the step up to Formula 1."
Aston Martin on Monday signed the 41-year-old Alonso, a two-time world champion, to replace Sebastian Vettel, who announced his retirement last week. Alonso's contract with Alpine was ending this season.
It's been a hectic six days of F1 "silly season" that opened ahead of the Hungarian Grand Prix with Vettel announcing he'll retire at the end of the year. Alpine said Alonso had not given the team any indication he was leaving as late as Sunday night after the race, and the Piastri promotion was quickly announced.
Williams, meanwhile, said USA driver Logan Sargeant will make his F1 debut when he runs the first practice session at the United States Grand Prix later this year. Sargeant, a current F2 driver from Florida, will be the first US driver to participate in an F1 weekend since Alexander Rossi in 2015.
Alpine said Piastri has already been undergoing "an intensive and comprehensive training program" this season to "prepare him for the next big step" into F1.
"As our reserve driver he has been exposed to the team at the track, factory and testing where he has shown the maturity, promise and speed to ensure his promotion to our second seat alongside Esteban," Szafnauer said. "Together, we believe the duo will give us the continuity we need to achieve our longterm goal of challenging for wins and championships."