They say love hurts. But it can also make people feel better.

In an offbeat study, researchers applied "moderately painful heat stimuli" to the forearms of 25 women while each held the hand of her boyfriend, the hand of a male stranger, or squeezed a ball. The women reported less pain when holding their boyfriends' hands.

In a second test, again with the pain applied, each woman was shown a picture of a chair, a stranger and her boyfriend. Seeing boyfriend photos again caused the women to report less pain than when viewing the other images.

"This changes our notion of how social support influences people," said study co-author Naomi Eisenberger, assistant professor of psychology at UCLA. "Typically, we think that in order for social support to make us feel good, it has to be the kind of support that is very responsive to our emotional needs. Here, however, we are seeing that just a photo of one's significant other can have the same effect."

The study was small, however, and more research would be needed to confirm the findings and figure out exactly what's going on. The results are detailed in the November 2009 issue of the journal Psychological Science.

Eisenberger and colleagues say the study suggests practical advice: If you're going through a stressful or painful experience, and you don't have a loved one handy, at least find a photo.