The midfielder was forced off with a knock during la Roja's win over Equatorial Guinea just a day after Sami Khedira suffered cruciate ligament damage
The 31-year-old played his first match for his country since last appearing for them six months ago against France, and was named captain after Vicente del Bosque fielded a young starting XI against the African side.
But fresh from recovering from a groin operation that ruled him out of la Roja's Confederations Cup campaign, the midfielder went down under a challenge from Thierry Fidjeu clutching his ankle and was replaced by Sergio Busquets, although initial examinations suggest the midfielder has merely suffered bruising.
Speaking to reporters after the match, Del Bosque assured: "It's nothing serious, just a knock."
Los Blancos coach Carlo Ancelotti will be particularly relieved to hear the good news, after already being forced to contend for the rest of the season without Sami Khedira.
The Germany international tore his anterior cruciate ligament in Friday's 1-1 draw with Italy, and faces a recovery period of at least six months.
A prolonged spell on the sidelines for Alonso would have left Madrid with something an injury crisis in midfield, with Luka Modric, Asier Illarramendi and Casemiro the only recognised alteratives.