Can a mother's boyfriend claim her child on taxes even if he has no legal custody?

If he was responsible for over 50% of the cost of the child, he can claim the child as a dependent. That would mean that no one else was entitled to claim the child, including the father and mother.