Updated

Republican presidential contender John McCain on Friday used the term "tar baby," considered by some a racial epithet, and later said he regretted it.

Answering questions at a town hall meeting, the Arizona senator was discussing federal involvement in custody cases when he said, "For me to stand here and ... say I'm going to declare divorces invalid because of someone who feels they weren't treated fairly in court, we are getting into a tar baby of enormous proportions and I don't know how you get out of that."

After the event, McCain told reporters: "I don't think I should have used that word and I was wrong to do so."

•Click here for more stories from the 2008 presidential campaign.

The senator said he hoped it wouldn't be viewed as a racial remark. He argued that he was trying to say that it wouldn't make sense for him to have a role in something left to the courts.

Last summer, a top McCain rival, Mitt Romney of Massachusetts, apologized for referring to the troubled Big Dig construction project in Boston as a "tar baby" during a fundraiser in Ames, Iowa.

The term dates to the 19th century Uncle Remus stories, referring to a doll made of tar that traps Br'er Rabbit. It has become known as a way of describing a sticky mess and has been used as a derogatory term for a black person.