(Reuters) - A gunman opened fire on Tuesday on two women outside of a northeast Arizona courthouse, killing them both in an apparent legal dispute, authorities said on social media.

A male shooter was taken into custody at the Navajo County Superior Court where he fatally shot the two women after a court hearing, Navajo County said on its Twitter account.

"A dispute stemming from a court hearing earlier today led to one of the parties meeting the two victims outside of the courthouse where the suspect opened fire," the Navajo County Sheriff's Office said on its Facebook page.

The women and the shooter were not identified by authorities.

(Reporting by Brendan O'Brien in Milwaukee; Editing by Shri Navaratnam)