The answer to the quiz question of who was responsible for this finish, the end to the long and storied World Cup career of the Brazil great Marta, will be Jamaica.

Marta’s two-decade relationship with the World Cup is over after Jamaica, one of the surprise performers in a tournament marked by surprise performances, prevented Brazil from securing the win it required to reach the round of 16. Jamaica held Brazil scoreless in a draw, 0-0, in Melbourne.

“Marta ends here. There’s no more World Cup for Marta,” she said. “I’m very grateful for the opportunity I had to play in another World Cup, and very happy with everything that has been happening in women’s football in Brazil and in the world.”

Jamaica, which reached the knockouts in the same World Cup in which it won its first game in the tournament, finished second in its group to France, which comfortably beat Panama, 6-3.

In a tournament that has suggested a changing of the guard, with upset results becoming commonplace, the emergence of new talents and the fading of old stars, it was perhaps fitting that it was Jamaica that delivered the knockout blow to Brazil and Marta, who has said she will not compete in the World Cup again.

Jamaica’s players celebrating at the final whistle.Credit…Asanka Brendon Ratnayake/Reuters

Having held France, considered one of the favorites before the tournament, to a draw, and then winning its first World Cup game by beating Panama, Jamaica proved itself once more on a frigid night, displaying composure and cool heads in repelling the little offensive attack that Brazil had to offer.

As the Brazilians slumped in dismay, Jamaica’s team sprinted across the turf, barely believing what it had accomplished having arrived in the tournament after a cash crisis that saw players ask the public for financial support. The speed of its achievements has stunned even its own players.

“Today might be the new best day in Jamaican football history,” forward Kayla McKenna said in an interview, after the draw in the tournament opener against France was heralded as such by the team’s coach, Lorne Donaldson.

For Brazil, long a program to aspire to in world soccer, the departure at the group stage is a low it has not suffered since 1995, eight years before Marta first donned the national colors.

Handed her first start of the tournament, a stage she has played on for six different editions stretching back to a first appearance in 2003, Marta was largely unable to impose herself on a game that at times appeared to pass her by before she was substituted with 11 minutes to go.

Now, 37, and 23 years into a career that is older than some of her teammates, Marta and her teammates were for the most part kept at bay by well organized and physical Jamaican defense

A few minutes after the final whistle, Marta met quietly with one of her heirs apparent, Jamaica forward Khadija Shaw.

Shaw, a 26-year-old known as Bunny, has called Marta an idol in the past, and she appeared to restate her admiration to the Brazilian as they spoke alone.

Marta replied with a nod and a thank you, and then pointed a finger toward Shaw and began to speak animatedly, as if to say she was passing the torch, and responsibility to carry the game forward, to young stars like her.

“I just told her congrats on the wonderful career she had and I told her for me as a young girl growing up, she was an inspiration for me,” Shaw told reporters. “And not just for me but for a lot of people in the Caribbean.”

Marta was in tears on the eve of the game as she reflected on the impact she has had on players — like Shaw, who was 3 when Marta first played in a World Cup — during a lodestar career.

But while her past is guaranteed to be celebrated, her future is less clear.

Pia Sundhage, Brazil’s Swedish coach, was blunt in her assessment of her team’s shortcomings. Her players were, she said, too slow and too ponderous in possession. She suggested there would be wholesale changes the next time she picks a Brazilian squad.

No one would be spared if a better option can be found, including Marta, who might want a better farewell than the one she had at the World Cup.

“Whether she’s good enough to be called up for the national team, well, let’s see,” said Sundhage, who a day earlier was full of praise for Marta’s contribution to global soccer.

The anxiety of a departure that would have been unthinkable when Brazil embarked for Australia was evident from the first minutes. Brazilian fans at the game jeered 10 minutes into the game over what they perceived as time-wasting by the Jamaicans. That frustration was matched by their team, with players frequently waving their arms in frustration at the referee.

Jamaica overcame sustained pressure by Brazil in the second half to preserve its shutout, stifling the Brazilians by not yielding any real openings that put their goalkeeper, Becky Spencer, to a stern test.

When Marta was substituted out of the game, replaced by fresher, younger legs late in the second half, she dashed to the sidelines and exhorted her replacements to make one last push, to score the goal that would have prolonged her stay in the World Cup.

Those exhortations and those changes failed to elicit any improvement. Marta’s World Cup, Brazil’s World Cup, is over. Jamaica will always remember the night its team sent a World Cup legend into retirement, and the night new stars were born.