Mr. Khogyani said one bomb, apparently hidden under a raised dais used by the sports announcer, exploded around 11:30 p.m., during a break in the match while speeches were being made. That was followed by two more blasts at the gates of the cricket ground, apparently intended to kill fleeing spectators. It was not clear whether those bombs had also been planted or were carried by suicide attackers; one was in a motorized rickshaw.

The attack was the first major one in Afghanistan since the holy month of Ramadan began on Thursday, but it came in the wake of a series of deadly strikes across the country as part of the Taliban’s spring offensive.

The match was taking place late at night, a common practice during Ramadan, when most people are fasting during the daylight hours. It was billed as the Ramadan Cricket Cup.

The chairman of the Afghanistan Cricket Board, Atif Mashal, an extremely popular figure, condemned the attack on Twitter, saying that cricket had been a source of happiness and pride for the entire country. “These attacks are against peace, unity and humanity,” he said.