The World Cup thriller between the United States and Portugal on Sunday night was the most-watched soccer game in American history.

ESPN announced Monday that its telecast of the game averaged 18,220,000 viewers. The previous high for a soccer game came in 1999, when 17.975 million viewers watched the U.S. women win the 1999 World Cup final in a game played at the Rose Bowl.

Viewership peaked at nearly 23 million during the frenzied final minutes of the 2-2 draw.

The network also set an American ratings record for any men’s soccer game. U.S.-Portugal earned a 9.6 rating (reflecting the percentage of televisions tuned into the broadcast). That’s higher than the 9.5 rating earned by the 1994 World Cup final between Italy and Brazil that also was played at the Rose Bowl. The 1999 women’s final still holds the mark with an 11.4.

U.S.-Portugal was the most watched nonfootball telecast in ESPN history.

About 11 million viewers watched last week’s U.S.-Ghana game. That total set a record for a soccer broadcast on an ESPN network and was the ninth-most-watched overall. The games that had more viewers, including the 1994 men’s and 1999 women’s World Cup finals, were broadcast on ABC.

A broadcast of U.S.-Portugal on the Spanish-language Univision drew 6.5 million viewers, a record for an American game on the network. Combining both the ESPN and Univision numbers means the game had 24.7 million viewers, which also sets a record for any soccer game broadcast in the U.S. (That mark was held by the 2010 World Cup final, which attracted 24.3 million viewers on both ABC and Univision.)

As a comparison, the average late-afternoon Sunday football game on Fox averaged 27.2 million viewers in 2013.