A young girl with cancer has been sworn in as an honorary police officer during a ceremony in the US state of Texas.

Abigail Rose Arias took an oath at Freeport Police Department to be kind to others, to help others when they need help and to keep fighting the bad guys.

When she was four years old, Abigail was diagnosed with kidney cancer in 2017.

She was declared cancer-free after a seven-month treatment, but found out months later that the same disease had returned.

She received chemotherapy treatments in hopes that she could beat it again, but that was not the case, according to a fundraising campaign launched to help the family with medical bills and nutrition treatments.

Doctors told the family there is nothing else they can do, her mother said, adding that they are enjoying every minute they can and making many memories with their girl.