Actually, it is a landlocked, rocky speck of a nation, situated near Rimini, Italy. The craggy views are spectacular. San Marino’s three medieval towers rise like a sandstone wedding cake above the Adriatic coast 16 miles to the east. To the west, mountain peaks protrude like rows of shark teeth.

Image San Marino shares borders with Italy, but not its soccer aptitude. Credit... The New York Times

San Marino has one of the world’s highest standards of health care, according to the World Health Organization, and calls itself the oldest sovereign republic, founded in 301. But soccer defeats are inevitable in a microstate that has the population of Gloucester, Mass., and at 24 square miles, is about one-third the size of Washington (Monaco and Vatican City are smaller but are not recognized by FIFA.)

There are only three professional players on San Marino’s national team. The others are students, clerks, fitness instructors. They play for gas money and train about three days a week, often at 9 p.m., after their day jobs. Mazza, the coach, is a physical education teacher who receives no pay for his soccer duties beyond expenses.

On Sept. 6, the day of a home match against Sweden, then ranked 18th in the world, the reserve goalkeeper Federico Valentini was working in a bank when he received a call from the soccer federation. San Marino’s starting keeper, Aldo Simoncini, who plays for Cesena in Italy’s top league, Serie A, was unavailable because of a hamstring injury.

“This is your moment,” Giorgio Leoni, the technical coordinator of San Marino’s national team, told Valentini.

With little time to get nervous, Valentini played assuredly and held Sweden to a 0-0 draw until shortly after a San Marino defender was ejected in the 53rd minute. Sweden scored a flurry of late goals to win, 5-0, against a short-handed opponent. But Valentini acquitted himself well, even parrying a shot from Sweden’s Zlatan Ibrahimovic, one of the world’s top forwards.

“He was so excited,” Andy Selva, San Marino’s captain, said of Valentini. “We told him we would call him up at the last minute every match.”