American actor Armie Hammer has cited a “vicious and spurious online attack” as reason behind his decision to pull out of an upcoming film. 

The Social Network star was slated to appear alongside Jennifer Lopez in the action-comedy ‘Shotgun Wedding’, although, the role will have to be re-cast after Hammer’s private messages were leaked online, according to a BBC report.

Hammer released a statement, wherein he dismissed the messages and said that the online harassment meant he was not willing to stay away from his children for months. 

“I’m not responding to these (false) claims but in light of the vicious and spurious online attacks against me, I cannot in good conscience now leave my children for four months to shoot a film in the Dominican Republic,” the 34-year-old said. 

Hammer also said that the studio Lionsgate “is supporting me in this and I’m grateful to them for that”. He has two children, aged six and three, with TV host Elizabeth Chambers, with the couple having announced their divorce last year. 

Hammer began trending on social media over the weekend after disturbing messages about sexual fantasies, which were claimed to have been sent by him, surfaced online. 

The film’s producers have accepted his decision to step down from the role, a spokesperson for Shotgun Wedding was reported to have confirmed. 

“Given the imminent start date of Shotgun Wedding, Armie has requested to step away from the film and we support him in his decision.”