Alec Baldwin has been accused of unleashing a racist rant against a paparazzi photographer outside his apartment building.

The '30 Rock' star found retired New York Police Detective (NYPD) G. N. Miller staking his Manhattan home on Sunday (17.02.13) trying to gain information on Alec's pregnant wife, yoga teacher Hilaria Thomas - who is being sued by a student.

Alec is alleged to have called Miller, who is black, a ''coon'' and a ''crackhead'' and unleashed other insults before proceeding to make comments about his mother, the former police officer wrote in his statement.

The 54-year-old actor also apparently told the snapper to ''suck my d***'' and branded Miller's ID showing he is a retired police officer as ''fake''.

Miller told the New York Post newspaper: ''He was saying some serious racist stuff. He could have said a lot of other stuff. But he used all of the stereotypes associated with black people.''

Shortly before the altercation, Alec had been approached by a female New York Post reporter inquiring about the lawsuit against his wife, to which Alec is said to have responded by grabbing her arm and saying: ''I want you to choke to death.''

However, following the altercations, Alec is filing a formal complaint against Miller - who he refers to as ''Ralston'' in a series of tweets.

In a post now deleted, Alec wrote on Twitter: ''Moments after I tweet about the Post, Ralston, the ex-crackhead ''photographer'' shows up at my door w 1 of Murdoch's nieces in tow.

''Ralston claims he's ex NYPD!! That can't be!!! Ex NYPD don't become crackhead, ex jailhouse paparazzi! (sic)''

He also thanked officers who came to his home and took his statement about being ''assaulted''.

He continued in tweets that still remain on his page: ''Thank u 2 NYPD officers who came to my home 2day so that I could file a formal complaint against NY Post ''photographer'' who assaulted me (sic)''

Alec told police Miller ''pushed into him'', but the photographer claims it was the other way round.

In a statement on behalf of the actor, a spokesperson said: ''That's one of the most outrageous things I've heard in my life.''