A mentally ill man "sacrificed" his infant daughter by tossing her into a river, a court in Australia heard Monday.

The body of the nine-month-old girl washed up on Surfers Paradise beach on Nov. 19, 2018, and was found by an 18-year-old. Investigation revealed that the baby was tossed into a river, where currents and tides took her to the beach 12 miles away. The girl’s 49-year-old father was traced and detained for questioning.

The court heard Monday that the unidentified man told investigators that he "sacrificed" the baby as her first birthday "would have meant the end of the world." He added that the girl was a "demon" and that it was his "prophecy" to kill her.

"He said if she’d turned one it would have meant the end of the world. There were garbled biblical themes accompanied by grandiose statements," prosecutor Brendan Campbell told the court, Perth Now reported.

"It is possible she had already been smothered. However, it is more likely she was still alive and drowned," Campbell added.

The court was also told the man appeared "floridly psychotic" while in police custody.

It was also revealed that the man and his partner met in March 2016 following which she got pregnant with their son. The man was unhappy with her second pregnancy and also attempted to convince his relatives to adopt the child.

Following the girl’s birth, the man reportedly became violent towards his partner and didn’t treat their daughter too well.

On the day of the incident, the man convinced his partner to give away the girl to a homeless woman as they did not have the means to take care of the baby. The homeless woman returned the baby realizing she could not care for her, Campbell reportedly said.

Leaving his partner and their son in the car park, the man took the baby to the river and "cast her" into the waters.

The trial is ongoing and during the next hearing, a forensic psychiatrist is expected to speak about the accused's mental health.

Baby Feet
This is a representational image of a baby's feet. Pixabay