Chris Pratt took to social media Monday to urge his followers to pray for Kevin Smith after the filmmaker suffered a serious heart attack Sunday night — only to be attacked by commenters who mocked the actor and questioned whether prayer was an effective way to respond to the health scare.

The 38-year-old Guardians of the Galaxy star and openly religious Christian wrote Monday on Twitter that though he hardly knew Smith, he is a fan of his work and was praying for him to make a full recovery.

Smith tweeted from a hospital bed early Monday morning that he had suffered a “massive” heart attack and had nearly died following a performance at a comedy show Sunday night.

“Kevin we don’t know each other too good but I have loved you since Clerks and I’m praying my ass off for you cause I believe in the healing power of prayer. Can you please pray with me people!?” Pratt wrote.

In another tweet, the actor said he’d been inspired when he saw Smith’s first film, the low-budget independent breakout hit Clerks, and that he would “continue” to pray for the filmmaker.

Kevin we don’t know each other too good but I have loved you since Clerks and I’m praying my ass off for you cause I believe in the healing power of prayer. Can you please pray with me people!? 🙏♥️ https://t.co/syB7BiQaoY — chris pratt (@prattprattpratt) February 26, 2018

Praying for you. I will continue to. You inspired me with Clerks when I was a senior HS. I’m tagging my Lb/rb football coach who showed me the movie cause he believed in me and knew I’d be inspired. @hodge1916 🙏♥️🙏 https://t.co/syB7BiQaoY — chris pratt (@prattprattpratt) February 26, 2018

But several of Pratt’s followers quickly blasted the star, comparing his call for prayer to politicians who have sent “thoughts and prayers” to the victims of recent school shootings.

“WTF is praying going to do?” wrote one commenter. “Wise up! He’s in hospital, science is the best place for him, diet change and exercise. Not random thoughts by you or anyone else.”

“Healing power of prayer? This is a parody right?” wrote another.

The comments were among several by users who slammed Pratt for his initial tweet.

However, numerous commenters defended the star and said they would join in praying for Smith.

“These comments to your prayer request are awful. Prayers are a beautiful thing,” wrote lifestyle blogger Vera Sweeney. “I don’t know how this country lost that notion. When did we lose respect for one another’s beliefs? What happened to tolerance?”

Also joining in to defend Pratt was his Guardians of the Galaxy director James Gunn.

“I’m not tweeting this to defend Chris – he’s a big boy and can take care of himself,” Gunn wrote in a series of nine tweets. “But for me, personally, prayer and meditation are great boons to my life and help me navigate my way through this world, and I don’t want to dissuade others who find those things useful.”

So I just read Chris Pratt’s tweet to Kevin Smith saying he would pray for him & made the mistake of reading the comments, many of which go off on Chris for saying he’d pray. I think people misunderstand the backlash against “thoughts & prayers.” (thread) — James Gunn (@JamesGunn) February 26, 2018

Pratt has been open about his Christian faith and has previously shared how he became religious as a teenager while living in Hawaii, before he moved to California and became a movie star.

Last year, the actor shared his favorite Bible verse in an Instagram post. The verse is Philippians 4:13: “I can do all things through Christ who strengthens me.”

In August, the actor credited his faith for his success while accepting a Teen Choice Award for his role in Guardians of the Galaxy, Vol. 2.

Follow Daniel Nussbaum on Twitter: @dznussbaum