Leonard Nimoy, the actor beloved by generations of fans for his portrayal of the half-human, half-Vulcan Spock on the TV series “Star Trek” and its subsequent film spin-offs, died Friday at age 83, the New York Times reported.

A life is like a garden. Perfect moments can be had, but not preserved, except in memory. LLAP — Leonard Nimoy (@TheRealNimoy) February 23, 2015

Nimoy was hospitalized just two days ago reportedly due to chest pains. He had announced last year that he was battling lung cancer. His wife, Susan Bay Nimoy, confirmed his death, citing end-stage chronic obstructive pulmonary disease as the cause.

In his last tweet, he wrote: “A life is like a garden. Perfect moments can be had, but not preserved, except in memory. LLAP.”

The last letters were an acronym for Spock’s signature catchphrase, “Live long and prosper.”

President Barack Obama released a heartfelt statement on Friday in reaction to the news in which he said, “I loved Spock.”

“Long before being nerdy was cool, there was Leonard Nimoy. Leonard was a lifelong lover of the arts and humanities, a supporter of the sciences, generous with his talent and his time. And of course, Leonard was Spock,” Obama said. “Cool, logical, big-eared and level-headed, the center of Star Trek’s optimistic, inclusive vision of humanity’s future.”

He added: “In 2007, I had the chance to meet Leonard in person. It was only logical to greet him with the Vulcan salute, the universal sign for ‘Live long and prosper.’ And after 83 years on this planet – and on his visits to many others – it’s clear Leonard Nimoy did just that. Michelle and I join his family, friends, and countless fans who miss him so dearly today.”

RIP Leonard Nimoy. So many of us at NASA were inspired by Star Trek. Boldly go… http://t.co/qpeH5BTzQc pic.twitter.com/nMmFMKYv1L — NASA (@NASA) February 27, 2015

Nimoy’s death also brought an outpouring of grief and love on social media, as well as from former co-stars. Actor George Takei, who starred alongside Nimoy as Captain Hikaru Sulu for years on “Star Trek,” told msnbc’s Kristen Welker, “The word ‘extraordinary’ is often overused, but I think it’s really appropriate for Leonard. He was an extraordinarily talented man, but also a very decent human being. His talent embraced directing as well as acting, and photography. He was a very sensitive man and we feel his passing very much. He’d been ill for a long, long time and we miss him very much.”

Veteran actor William Shatner, who starred as Captain James T. Kirk opposite Nimoy on “Star Trek,” said in a statement: “I loved him like a brother. We will all miss his humor, his talent, and his capacity to love.”

RELATED: Star Trek’s intergalactic war on terror

“Star Trek,” which debuted on NBC in 1966 was famous for tackling social issues under the guise of science fiction. Fans considered the logical and intellectual Spock character the show’s “conscience.”

“In Spock, I finally found the best of both worlds: to be widely accepted in public approval and yet be able to continue to play the insulated alien through the Vulcan character,” Nimoy once wrote.

However, despite a devoted cult following the show was canceled after just three seasons due to low ratings. Yet a steady and dedicated fan campaign brought the series to the big screen in 1979. Thirty-six years, 12 films and over a $1 billion at the box office later – the rest is history.

Although Nimoy enjoyed a prolific career as both a director (“Three Men and a Baby”) and as a film actor (“Invasion of the Body Snatchers”), he will always be best known for his many appearances as Spock over six decades – a fact that he was not quite comfortable with at first.

In 1977 he famously penned a memoir called “I Am Not Spock.” But in later years he embraced his legendary character and wrote a follow-up memoir entitled, “I Am Spock,” in 1995.

Nimoy also directed two of the most popular installments of the big screen “Star Trek” franchise: “The Search for Spock” and “The Voyage Home.”

And Nimoy was the only original cast member to appear in the J.J. Abrams reboot of the series, making cameo appearances in 2009’s “Star Trek” and 2013’s “Star Trek: Into Darkness.”

When those new films were released there was widespread pundit discussion about similarities between the cold, cerebral Spock character and Obama. The president himself was very aware of the comparison, which extended to each having pronounced ears.

In a 2011 interview with Barbara Walters, Obama said the biggest misconception about him is, “Me being detached, or Spock-like, or very analytical.”

Even if Obama doesn’t see himself that way, Takei says Nimoy did.

“He was one of the most thoughtful, analytical actors. He understood what the scene needed immediately and he was able to give guidance to us. And that is why he was such a gifted director as well. “

#RIP @TheRealNimoy who popularized #space travel for generations to come so we may live long and prosper pic.twitter.com/UxWc3PVulO — Scott Kelly (@StationCDRKelly) February 27, 2015

Meanwhile, Nimoy’s granddaughter Dani sent a special message to fans from his Twitter account. “Hi all, as you all know, my Grandpa passed away this morning at 8:40 from end-stage chronic obstructive pulmonary disease. He was an extraordinary man, husband, grandfather, brother, actor, author-the list goes on- and friend. Thank you for the warm condolences. May you all LLAP. - Dani.”

She added: “P.s. I will be putting special shirts up on our site, SHOPLLAP.com , where all of the proceeds will go to the COPD Foundation. I hope to hear from you all.”