Spanish guitarist Paco de Lucia was famous for his mastery of flamenco but explored many musical genres. (Dani Cardona/Reuters)

Paco de Lucia, one of the world’s greatest guitarists who dazzled audiences with his lightning-speed flamenco rhythms and finger work, died Feb. 26 in Mexico. He was 66.

He suffered a heart attack while on vacation at the Caribbean beach resort of Playa del Carmen and was taken to a hospital, where he died, Quintana Roo state attorney general Gaspar Armando Garcia told Mexico’s Enfoque Radio.

Mr. De Lucia — whose real name was Francisco Sanchez Gomez — was best-known for flamenco but also experimented with other genres of music. One of his most famous recordings was “Friday Night in San Francisco,” with fellow guitarists John McLaughlin and Al Di Meola in 1981.

During the 1960s and 1970s, he formed a popular duo with late flamenco singer Camaron de la Isla. The two released 10 records together.

Mr. de Lucia’s 1973 rumba “Entre Dos Aguas” (Between Two Waters) became one of the most popular recordings in Spain.

He was awarded the Culture Ministry’s Fine Arts Gold Medal in 1992 and the prestigious Prince of Asturias prize for the Arts in 2004. He was granted an honorary doctorate by the Berklee College of Music in Boston in 2010.

Mr. de Lucia’s last studio album “Cositas buenas” (Good Things) earned him his first Latin Grammy in 2004, and his 2012 live recording “En Vivo” (Live) received a second.

Describing the death as unexpected and premature, Spanish Education and Culture Minister Jose Ignacio Wert said Mr. de Lucia was “a unique and unrepeatable figure.”

Mr. de Lucia, who was born Dec. 21, 1947, and grew up in the southern Spanish city of Algeciras. He was immersed in flamenco music from an early age. His father and two brothers played guitar, and a third brother an accomplished flamenco singer. He took his artistic name from that of his Portuguese mother, Lucia.

Mr. de Lucia’s formal schooling ended when he was 11, and he was soon performing flamenco in local bars. At 14, he made his first record with his brother Pepe, “Los Chiquitos de Algeciras” (Kids of Algeciras).

“I didn’t study music,” Mr. de Lucia told the Associated Press in 2012. “I literally lived it. Flamenco was a way of life, a relationship with music, more than a career. I never learned about harmony or canons in music.”

Despite his lack of formal musical training, Mr. de Lucia impressed people with his remarkable dexterity, hand strength and technique that allowed him to produce machine-gun-like “picado” riffs so characteristic of flamenco guitar.

“I have always found that the more technique you have the easier it is to express yourself,” he told Spain’s El Pais newspaper in an interview in 2004. “If you lack technique, you lose the freedom to create.”

Arguably the most influential flamenco artist ever, Mr. de Lucia infused new life into the traditional art form and is credited with modernizing it by introducing influences from other musical forms such as jazz, bossa nova, classical and salsa.

Although some of these innovations drew criticism from flamenco purists, Mr. de Lucia defined his own influential sound by staying true to his flamenco roots no matter what he played.

His own sextet, formed in 1981, includes bass, drums and saxophone. In addition to his work with McLaughlin and Di Meola, his high-profile collaborations included work with guitarist Larry Coryell and pianist Chick Corea, who joined Mr. de Lucia’s group for the album “Zyryah” in 1990.

In 1995 he played with Bryan Adams on the song “Have You Ever Really Loved a Woman.”

“Paco was and will be a universal artist, who took the guitar and flamenco sentiment to the heart of the whole world,” said Jose Luis Acosta, president of the Spanish Artists and Editors Society.