What do you get when you ask hundreds of Brazilian high school students to dance the pe?o—a popular move that translates to “buffalo cowboy”? They won’t just trot like horses and raise their arms over their heads as if swinging a lasso—they’ll also form stronger bonds with friends and increase their pain tolerance, according to a new study. What’s more, they’ll boost their social connections and raise their pain thresholds if they all dance in sync, a new study shows. Researchers recruited 264 students from local schools on Marajó island in Brazil to learn four dance moves, then perform them either together or out of sync to a catchy, 130-beat-per-minute electronic dance beat. Doing the moves in sync significantly increased how bonded the students felt to their fellow dancers, the scientists found. Dancing together also decreased the students’ sensitivity to pain: Before and after dancing, the scientists put blood pressure cuffs on the teenagers’ arms and slowly—but safely—inflated them, asking the students to say when they were uncomfortable. Those who had danced in sync with one other were able to tolerate 20 additional units of pressure after the session, suggesting that their pain response had likely been dulled by the release of brain chemicals called endorphins. Although physical exertion also releases endorphins, that didn’t explain away the findings, the researchers say: Even students who did the movements sitting down showed decreased pain sensitivity and an increased sense of closeness to their fellows. The research, published today in Biology Letters, fits with previous studies showing that people who tap in synchrony, or walk step in step, trust each other more and are more willing to help one another, the team says. They add that therapies involving synchronized movement could help people with autism form social connections.