KABUL, Aug 2 (Reuters) -- Taliban fighters pushed deeper into the southern Afghan provincial capital of Lashkargah on Monday and closed in on government buildings, a senior official said, as the insurgents pressed a rapid advance.

Heavy fighting was raging close to the National Directorate of Security, the prison and the police headquarters in the main city in Helmand province, the government official said, asking not to be named.

Taliban fighters have moved in on three provincial capitals in the last few days and seized territory nationwide since Washington said it planned a complete withdrawal of troops by September.

Most of their advances have focused on rural areas and they have yet to take full control of a major city.

An Afghan military commander said the government forces managed to beat back the Taliban later in the day.

"In the afternoon the level of intensity of the fighting (in Lashkargah) decreased as the Taliban suffered heavy casualties following the air and ground operations," Sayed Sami Sadat, the commander of the Maiwand army corps, told Reuters.

President Ashraf Ghani on Monday blamed the country's fast-deteriorating security situation on a "sudden" decision by the United States to withdraw its troops.

"We have had an unexpected situation in the last three months," he told the Afghan parliament.

Ghani added that the Afghan government had a US-backed security plan to bring the situation under control within six months. He also accused the Taliban of keeping up its ties with terrorist groups and of stepping up attacks on women.

The Taliban rejected Ghani's accusations.

"Declarations of war, accusations and lies cannot prolong Ghani's government's life; his time has run out, God willing," the movement's spokesman, Zabihullah Mujahid, said on Twitter.

Peace talks between the Afghan government and Taliban negotiators started last year in the Qatari capital of Doha, but have not made any substantive progress despite a few rounds.

The two sides committed to speeding up the talks, at a meeting last month in Doha between a high-level Afghan political delegation and the Taliban.