Six children were waiting to be picked up by their families when a man broke into a childcare centre, self-harmed, and was involved in a confrontation with police before he died.

The 28-year-old forced his way into the Habitat Early Learning centre in Peregian Springs on the Sunshine Coast, north of Brisbane, after 6pm on Monday, while six children and five staff members were in the building.

The centre said security measures, including fingerprint scanners, prevented the man from entering immediately.

Police tape at Habitat Early Learning on Tuesday.

Police tape at Habitat Early Learning on Tuesday.Credit: Nine

This gave the staff enough time to follow safety protocols and hide the children in a secure location.

“Our staff at Habitat Peregian Springs are commended for their quick thinking and courage in handling last night’s tragic incident,” the centre said in a statement.

Habitat said the man was not known to any staff or families, and the children did not see the incident unfolding after he first tried to enter the building.

The centre has not reopened since the incident on Monday evening.

The centre has not reopened since the incident on Monday evening.Credit: Nine

The company thanked Queensland Police, “who responded within minutes to resolve the situation”.

“We are providing counselling to all of our staff, children and parents involved. The centre will remain closed for several days as we work with police,” the statement said.