The Timberwolves fought off the Nuggets after leading by as many as 14 in the fourth period. It was the fourth win in five games for Minnesota while the Nuggets' struggles continued with their sixth loss in nine outings.
Barea gave Minnesota a five-point cushion by making two free throws with 14 seconds left, but Corey Brewer hit a 3-pointer for the Nuggets with 7.8 seconds remaining.
Cunningham was then fouled, but he could make just 1-of-2 with 5.4 seconds to play. That gave Ty Lawson a chance to tie it with a 3-pointer, but he could not convert as time expired.
Nikola Pekovic scored 22 points and had 11 rebounds for the Timberwolves, who made 16 more free throws than did the Nuggets. Andrei Kirilenko contributed 18 points and Barea produced 17 to go with eight assists and five rebounds.
Minnesota star Kevin Love, who was quoted Wednesday as saying he was disappointed by the front office's inability to improve the team, made just 3-of-17 shots from the field and scored eight points.
Denver got 26 points and 14 rebounds from Kenneth Faried and 24 points from Danilo Gallinari.
Interpol investigating stolen passports on missing flight
Jessica Simpson shares three-way kiss with friends in photo