Image source, Wa policeImage caption, Police released a photo of Cleo Smith after her rescue

Early on Wednesday, police smashed their way into a house in the Australian town of Carnavron, where they found a four-year-old girl who had been missing for 18 days.

Cleo Smith disappeared from her family's tent at a campsite near Carnarvon on 16 October, triggering a massive search operation.

A 36-year-old man is now in custody and being questioned by detectives.

Here's what we know about case and what led police to Cleo.

'Needle in a haystack'

Cleo's family were on the first night of their holiday at the Quobba Blowholes camping ground when she went missing between 01:30 and 06:00 on 16 October.

The remote site in Macleod is about 900km (560 miles) north of Perth, and is a local attraction on the state's Coral Coast – known for its windswept ocean scenery, sea caves and lagoons.

Image source, EPAImage caption, A major police operation was launched after Cleo went missing

Cleo had been sleeping on an air mattress next to her younger sister's cot. When her mother, who had been sleeping in the second room of the tent, got up in the morning, Cleo was gone and the tent door was open.

Police said this raised fears of an abduction. Ms Smith was adamant Cleo would not have left the tent on her own.

A major search operation involving a task force of more than 100 officers was launched.

Western Australia Deputy Police Commissioner Col Blanch has described it as being like looking for "a needle in a haystack".

Thousands of pieces of evidence

The search for Cleo covered land, sea and air, with reconnaissance planes used to comb sparsely populated areas.

ABC reporter Evenlyn Manfield described the extensive search operation, saying police were "up in the air, on horseback, using drones to forensically map every area inch-by-inch looking for clues".

Police even scoured through hundreds of bags of roadside rubbish along a 600km (373 mile) stretch of Western Australia.

Authorities also offered a A$1m ($750,000; £540,000) reward for information on Cleo's whereabouts.

This video can not be played

To play this video you need to enable JavaScript in your browser.Media caption, The moment four-year-old Cleo Smith was rescued from a locked house by police

Over the 18 days that Cleo was missing, police said they collected thousands of pieces of evidence, intelligence, data and witness statements.

Deputy Commissioner Blanch described it as being a "hard, hard slog".

"Combined with some early information, this was dogged, methodical police work," said Commissioner Chris Dawson, adding that the team had "worked their way through every lead possible".

The final pieces of the puzzle

Police have not revealed the exact details of what led them to the locked house in Carnavron, where they found Cleo alive and well.

Commissioner Dawson told reporters "really important" information about a car helped direct police to the house, but has not elaborated on what this was.

He and other officers have also stressed that a number of forensic clues were vital in finding the missing four-year-old.

Deputy Commissioner Blanch said phone data also played a key role.

"It's a big jigsaw, you know, everything contributed," he said.

"There were lots of things, that when we put the puzzle together it all led to one place, and that's where we found Cleo."