Suicide bombers and gunmen have stormed a police training centre in the eastern Afghan city of Gardez, killing at least 41 people.
Some 110 civilians and 48 police were injured. The interior ministry said the local police chief was among the dead.
The Taliban said it was behind the attack, and is being blamed for a second assault in neighbouring Ghazni province.
The violence there left 30 people dead, most of them security personnel.
At least 10 others were wounded.
Casualty numbers from both attacks could yet rise further.
A bloody day for Afghan police
The violence at the Gardez police headquarters in Paktia province began when a suicide bomber detonated a car filled with explosives, before a number of gunmen launched an assault on the building.
Security forces battled the militants for several hours. At least five of the assailants were killed, the interior ministry said in a statement.
The compound contains the headquarters of the national police, border police and Afghan National Army.
The victims included "women, students and police", Gardez public health director Hedayatullah Hamidi told AFP news agency.
Many were civilians who had gone to the site to get their passports and national IDs, the Paktia governor's office said.
The local hospital has called on people to donate blood, saying it is "overwhelmed".
University students queued at the medical centre to answer the plea, a photographer at the scene reported.
About 100km (62 miles) away, Ghazni police chief Mohammad Zaman said "dozens of Taliban" had died in the assault there.
There is no independent confirmation of the claim. The pattern was similar to the Gardez attack.
Armoured Humvee vehicles filled with explosives were detonated near the provincial governor's office, before gunmen moved in.
The bloodshed comes just days after police in the capital, Kabul, said they had arrested a would-be suicide truck bomber, averting a major incident.
The truck was carrying almost three tonnes of explosives and two bombs, which had been hidden under boxes of tomatoes.
Afghanistan's army and police have suffered heavy casualties this year at the hands of the Taliban, who want to reimpose their strict version of Islamic law in the country.
In April, then Defence Minister Abudullah Habibi and Army Chief of Staff Qadam Shah Shahim both resigned after a devastating Taliban assault on an army base outside the northern city of Mazar-e Sharif.
About 10 Taliban insurgents dressed in Afghan military uniforms made their way into the base and opened fire. Around 170 Afghan soldiers are believed to have died.
The country suffered another bloody assault just a month later in May, when a truck bomb killed more than 150 people in Kabul.