Those night-before-the-wedding jitters might have been more logical than you thought.

A study published this week in the journal Sciencefound that the gut reactions people had about each other shortly after their marriage helped predict whether they'd still be together four years later.

One hundred thirty-five newlywed couples, who all said they were happily married, took a test designed to elicit their subconscious doubts.

The test is similar to one used to show people whether they have prejudices they may not even be aware of against different racial groups, genders, age groups or others.

Each person was quickly shown pictures of their new spouse and then told to click a key associating either a positive or a negative word, such as "awful" or "awesome," with the picture. People who truly felt positive about their relationship took less time to connect positive words with their new spouse; those who hesitated, suggesting they had more subconscious trouble making that association, were more likely to be divorced four years later, the study found.

"It's not a perfect association," says Jim McNulty a psychology professor at Florida State University in Tallahassee, who led the research. McNulty, who is single, says he wouldn't yet use the system to test a would-be spouse, but it is useful for reminding ourselves to listen to our "gut" instincts.

"Our desire can lead us to evaluate (relationships) more positively than maybe our gut or automatic results would say we should," he says. "Our automatic thoughts can have real implications."

Counseling could help people key into these concerns and work through problems with the relationship, he says.

He's not sure, though, whether strengthening the positive associations someone has with a spouse would actually strengthen their relationship.

John Bargh, a social psychologist at Yale, says developmental psychology research suggests that automatically measured attitudes about social groups remain stable from childhood through adulthood, whereas consciously expressed attitudes are more prone to change. Thus, any negative automatic attitudes early in a relationship would be more likely than conscious ones to persist and cause problems later on.

Eli Finkel, a psychologist and relationship researcher at Northwestern University, says McNulty's study reflects a universal truth: "We don't always have as much insight into our emotional experiences as we might think."

Finkel says he would like to see tests like the one McNulty used added to the algorithm that some dating websites use to connect people. Someone's initial reaction could determine whether the website suggests them as a potential match, Finkel says.

"It's far too early to treat this procedure as some sort of diagnostic test, but incorporating some procedures along these lines would drastically enhance online dating algorithms," he says.