The estranged husband of an Australian woman murdered in Kenya and his cousin have been released in Nairobi without charge a week after their arrest.

Cyrus Bernard Maina Njuguna and his cousin John Njuguna Waithira were arrested on 24 October in connection with the murder of Gabrielle Maina.

The ABC reports a Kenyan magistrate ordered their release on Tuesday after no charges were laid.

Gabrielle Maina, a 40-year-old teacher, was shot dead by armed men riding a motorbike while walking near her home in the suburb of Karen on 19 October.

The ABC reports police were granted a seven-day extension for the detention of the two men in order to gather more evidence. Both maintain their innocence.

Maina and her husband were separated at the time she was killed. They have two young sons.

She was reportedly awarded a restraining order against her husband in April this year.

Her husband’s lawyer, Wilfred Nderitu, said his client had not been in the area at the time of Maina’s death.

“There is evidence that is capable of corroboration by many people, as many as 10, that Cyrus was in his office at the time that the murder took place,” Nderitu said outside court last week.