A former student who killed three children and three adults at a primary school in Nashville had drawn a detailed map of the building and conducted surveillance before carrying out the massacre, US police said.

Nashville police chief John Drake did not say what drove the killer, who they named as Audrey Hale, 28, to open fire on Monday morning at The Covenant School before being shot dead by police.

But he provided chilling examples of the killer’s elaborate planning for the attack, the latest in a series of mass shootings in the US.

“We have a manifesto, we have some writings that we’re going over that pertain to this date, the actual incident,” he told reporters. “We have a map drawn out of how this was all going to take place.”

He said in an interview with NBC News that investigators believe the killer had “some resentment for having to go to that school”.

The victims included three nine-year-old children, the school’s top administrator, a substitute teacher and a custodian.

After the killing, parents rushed to the school to see if their children were safe and tearfully hugged their kids, and a stunned community held vigils for the victims.

A child weeps while on the bus leaving The Covenant School (Nicole Hester/The Tennessean/AP)
A child weeps while on the bus leaving The Covenant School (Nicole Hester/The Tennessean/AP)

Rachel Dibble, who was at a nearby church where children were taken to be reunited with their parents, described everyone as being in “complete shock”.

“People were involuntarily trembling,” she said. “The children … started their morning in their cute little uniforms, they probably had some Froot Loops and now their whole lives changed today.”

Police gave unclear information on the gender of the killer.

For hours, police identified them as a 28-year-old woman and eventually identified the person as Audrey Hale.

Then at a late afternoon press conference, the police chief said that Hale was transgender. After the news conference, police spokesperson Don Aaron declined to elaborate on how Hale currently identified.

Authorities said Hale was armed with two “assault-style” weapons as well as a handgun.

At least two of them were believed to have been obtained legally in the Nashville area. Police said a search of Hale’s home turned up a sawn-off shotgun, a second shotgun and other unspecified evidence.

The victims were identified as Evelyn Dieckhaus, Hallie Scruggs, and William Kinney, all nine years old, and Cynthia Peak, 61, Katherine Koonce, 60, and Mike Hill, 61.

The website of The Covenant School, a Presbyterian school founded in 2001, lists Ms Koonce as the head of the school. Her LinkedIn profile says she has led the school since July 2016. Ms Peak was a substitute teacher and Mr Hill was a custodian, according to investigators.

APTOPIX Nashville School Shooting
Children from The Covenant School are taken to the Woodmont Baptist Church after the shooting at their school (Jonathan Mattise/AP)

Founded as a ministry of Covenant Presbyterian Church, The Covenant School is located in the affluent Green Hills neighbourhood just south of central Nashville that is home to the famed Bluebird Cafe – a spot typically beloved by musicians and songwriters.

The school has about 200 students from pre-school through sixth grade, as well as roughly 50 staff members.

“Our community is heartbroken,” a statement from the school said. “We are grieving tremendous loss and are in shock coming out of the terror that shattered our school and church. We are focused on loving our students, our families, our faculty and staff and beginning the process of healing.”

Metro Nashville Police Chief John Drake speaks to the media (Andrew Nelles/The Tennessean/AP)
Metro Nashville Police chief John Drake speaks to the media (Andrew Nelles/The Tennessean/AP)

Monday’s tragedy unfolded over roughly 14 minutes. Police received the initial call about an active shooter at 10.13am.

Officers began clearing the first storey of the school when they heard gunshots coming from the second level, Mr Aaron said. Police later said the killer fired at arriving officers from a second-storey window and had come armed with significant ammunition.

Two officers from a five-member team opened fire in response, killing the suspect at 10.27am, Mr Aaron said.

Late on Monday night, police released approximately two minutes of edited surveillance video showing the killer’s car driving up to the school from multiple angles, including one in which children can be seen playing on swings in the background.

Next an interior view shows glass doors to the school being shot out and the killer ducking through one of the shattered doors.

More footage from inside shows the killer walking through a school corridor holding a gun with a long barrel and walking into a room labelled “church office”, then coming back out.

In the final part of the footage, the assailant can be seen walking down another long corridor with the gun drawn.

Mr Aaron said there were no police officers present or assigned to the school at the time of the shooting because it is a church-run school.

President Joe Biden, speaking at the White House on Monday, called the shooting a “family’s worst nightmare” and implored Congress again to pass a ban on certain semi-automatic weapons.