The murderer who ambushed two NYPD officers then shot them dead asked passersby to follow him on Instagram and said 'watch what I'm going to do' before killing the two men.

Ismaaiyl Brinsley, 28, had earlier posted to the social network boasting that he would take the lives of two policemen.

He walked up behind the patrol car of officers Rafael Ramos and Wenjian Liu, parked up in Brooklyn, then fired four bullets at their heads, 'execution style'.

It has since emerged Brinsley had already been arrested 19 times for offenses including concealing a weapon, disorderly conduct, and trespassing.

He had also threatened to hang himself, and had been disowned by his mother and two sisters for being violent and aggressive.

Speaking at a press conference today, NYPD Chief of Detectives Robert Boyce revealed a timeline which began with the shooting of an ex-girlfriend near Baltimore, and ended with Ismaaiyl's suicide on a subway platform.

Arrested 19 times: Ismaaiyl Brinsley, 28, had an extensive rap sheet in multiple states, documents reveal

Charges: He was detained for, among other things, disorderly conduct, theft, and concealing weapons

Describing the final moments, caught on surveillance cameras, he said: 'We have found on one of our videos two males who spoke with the perpetrator just prior to the event.

'He asks them three things: For their gang affiliation, he asks them to follow him on Instagram, then he says "watch what I'm going to do".

'He then walks north down on Tompkins, past the two officers in the car, circles back around, goes across the street, then comes up behind the officers.'

Boyce added: 'His mother ... states he had a very troubled childhood and was often violent. His mother expressed fear of him and she hasn't seen him in one month.

'Brinsley attempted suicide in the past and attempted to hang himself a year ago.'

He has been linked with crime before, and has served jail time in Georgia and Ohio. It also emerged today that has admitted to suffering mental health problems in the past.

During a court hearing in Georgia's Cobb County in 2011, Brinsley was asked whether he had been in an institution or undergone treatment by mental health professionals, according to the New York Times.

He answered yes.

Fears: Brinsley's mother told police she didn't want anything to do with him as he was violent

Unstable? The double cop killer's mother also revealed she thought he had mental health problems

'Funny and intelligent'? A close friend of killer Ismaaiyl Brinsley, 28, described him as a nice guy and said he was cowardly for lashing out at officers

Together: Brinsley, left, was described in warm terms by close friend Jay Romero, right

The revelation came as the NYPD shifted into high alert over the prospect of further attacks - leading to the arrest of a man who boasted he was heading from Tennessee to New York to kill two more cops.

Daryl Lofton, 26, was reportedly collared by Memphis Police after posting his intent on Instagram - the network where Brinsley announced his killings.

According to the New York Post, he was let go after saying he made the post while drunk and wasn't serious. A New Yorker also seemed to make a threat - believed to be one of many the department is fielding.

A close friend of Brinsley's - Las Vegas janitor Jay Romero - described the shooter as 'intelligent' and 'funny'.

His mother expressed fear of him and she hasn't seen him in one month NYPD Chief of Detectives Robert Boyce in a Sunday press conference

He also said Brinsley was in deeply love with Shaneka Nicole Thompson, 29, whom he attacked near Baltimore, Maryland before heading to New York.

Romero, who spent a month with Brinsley last year, spoke to the New York Daily News about his murderous friend.

He said: 'He's funny. He was very intelligent and smart. He was into fashion.' He added Brinsley was a 'god-fearing' Muslim.

Of his assassination of the two officers, Romero said: 'What he did was wrong, man. What he did is a cowardly move. I don't know what he went through, what was on his mind.'

Another of Brinsley's friends, Awk Galan, spoke to DailyMail.com in Brooklyn - feet away from the crime scene - to describe how Brinsley had been 'acting strange' in the wake of the Eric Garner grand jury trial.

Father-of-six Garner was killed by NYPD officer Daniel Pantaleo, who arrested him for selling loose cigarettes on the street, then held him in a fatal chokehold.

The killing provoked global outrage, sparked violent protests across the US, and exposed severe racial divisions in New York City.

Mr Galan, who was a member of rap outfit P.Y. Gang with Brinsley, described their recent practises: 'We all noticed he was acting strange... different, it was kind of like he wasn't there when you spoke to him. He wasn't saying very much and he wasn't performing. He had a different kind of passion.'

Another member of the group, Paul Yawney, said Brinsley took part in the recent anti-police protests.

Yawney said: ‘He posted motivational stuff on Instagram and went to the protests. I think this really came as a shock to a lot of us. He shot his girlfriend this morning then went to shoot those cops. It's scary to think that's what he was thinking.'

Suicide: Brinsley ran into a subway station then shot himself in the head after carrying out the brazen attack

Tributes: Flowers were left on the sidewalk near the site of the killing. Above, Jeh Johnson, Presidnet Obama's Secretary for Homeland Security lays two bunches of roses

MOMENT TO MOMENT: HOW COP KILLER'S SICK RAMPAGE UNFOLDED Police today revealed a timeline of Ismaaiyl Brinsley's movements on a day that began with the unauthorized entry into his ex-girlfriend's flat and ended with his suicide in a Brooklyn subway station: 5.30am Enters apartment of ex-girlfriend Shaneka Thompson in Owings Mills, Maryland with a key he should not have had. They argue. 5.50am Brinsley fires a single shot at Thompson, reportedly into her stomach. He flees with her cell phone. 6.05am Brinsley calls Thompson's mother to apologize for shooting her. He claims it is an accident, and that he hopes she lives. 6.35am Baltimore County Police begins monitoring him. They track Thompson's cellphone to the I-95 freeway, where he is believed to have been riding a bus. During the journey he keeps phoning Thompson's mom, and reveals he is headed to New York City. 10.50am Brinsley arrives in New York City, in the West Side, and rides the subway to Brooklyn. 12.07pm He throws away Thompson's phone in the Barclays Center. The NYPD later recovered it. Investigators are unclear where he goes between midday and the killings at 2.47pm. 1.30pm Baltimore County Police send the NYPD a fax alerting them to Brinsley and his intentions. By the time it filters down to the rank-and-file, he has already struck. 2.47pm Brinsley identifies his targets in the Bedford-Stuyvesant area of Brooklyn, tells passersby to watch, then fires four shots at them. As he flees he confronts two Con Edison drivers, who chase him in their truck and point officers in their direction. He runs into the Myrtle/Willoughby G train station, where he shoots himself dead on the platform Advertisement

NYPD investigators are thought to be in Baltimore, Maryland, where Brinsley's gun rampage began early yesterday morning, to probe any gang links.

Brinsley shot and wounded ex-girlfriend Shaneka Nicole Thomspon at her home around 5.45am, before proceeding to Brooklyn, New York, where he pumped rounds into the heads of officers Rafael Ramos and Wenjian Liu.

Police are still waiting to interview Thompson, 29. They say Brinsley shot her in the abdomen before leaving on his murderous trip to New York.

Romero also told the News that Brinsley doted on Thompson. He said: 'He always talked about her, that she was the only girl he loved.'

She is in stable but critical condition in hospital and has been unable to speak, Baltimore County cops say.

Brinsley's motives remain unclear. But unearthed court documents from 2011 reportedly show that he has a history of mental illness.

According to the New York Times, he was asked at a 2011 plea hearing in Cobb County, Georgia, whether he had been in a mental institution or undergone treatment by a mental health professional.

He answered yes.

Gun: This photo provided by the New York Police Department shows the weapon used to kill the officers

Shooter: Brinsley had posted this photograph, where he posed in an elevator with a gun, weeks before the shooting

His actions are just the sort of attack the Black Guerrilla Family (BGF), who have strongholds in Baltimore prisons, were planning, according to police sources.

However, other investigators has suggested the links are unfounded.

The double killing followed months of aggressive anti-police posts from Brinsley's social media accounts, where he eventually announced the killings.

One told the New York Daily News: 'BGF has been talking about getting back at cops for Eric Garner and Ferguson'.

NYPD officers were warned to take extra care amid the extra tensions caused by a grand jury decision not to act over Eric Garner's death.

Earlier this month officers were reportedly warned to take extra precautions in the wake of a grand jury decision not to act over the death of Eric Garner, who died in a police chokehold on Staten Island. But the threat was thought to have faded.

It also emerged yesterday that police in Baltimore tried to warn the NYPD about Brinsley, but their faxed message to the department came through too late.

Their officers had spotted twisted posts on the Instagram social network in which Brinsley swore to take the lives of two officers in revenge for Garner's death in July.

He wrote: 'I'm putting wings on pigs today. They take 1 of ours, let's take 2 of theirs #ShootThePolice #RIPErivGardner [sic] #RIPMikeBrown'

Before: This picture and chilling message was posted on the alleged shooter's page two hours beforehand

Warning: This letter was circulated among NYPD officers in early December after rumors of an upcoming BGF attack

FUNDS FOR OFFICER'S CHILDREN The New York Yankees' Silver Shield Foundation has announced it will pay for the education of Rafael Ramos' two children. The group will also set aside money for education-related expenses needed by both spouses of the murderered officers. William Walters, chairman of the group which funds academic expenses for slain law enforcement officers, told ABC News: 'We just want to do good for these people that take care of us'. He said they plan to discuss the funds with the families on Monday. Advertisement

Earlier in this month the head of the New York City Sergeant's Benevolent Association sent a letter to officers warning of a 'credible threat' on police lives from an 'organized' group.

It came in the wake of information from an undercover officer suggesting that as many as 10 BGF members were primed to shoot NYPD officers.

The gang, which was founded in California in the 1960s, operates out of prisons and and has a sophisticated hierarchy and a long reach.

At a court hearing earlier this month, prosecutors revealed how the BGF ruled over the Baltimore City Detention Center, and had prison guards in their pocket.

The leader of the gang even convinced female guards, four of whom he had impregnated, to tattoo his name onto their skin.

A trial heard that the gang was so organized that it had a minister of education and a minister of finance governing the group from behind bars.

According to testimony from gang leader Tavon White, the group was able to orchestrate a prison stabbing of a gang enemy while guards looked on.

No specifics of the alleged gang links have yet been revealed. But Brinsley has criminal history in Georgia, where he has been arrested for robbery, disorderly conduct and carrying a concealed weapon.

It is unclear how far in advance Brinsley planned the killings. But social media posts going back months show a sustained animosity towards police, whom he would photograph from his car.

'If he knows what I know': In the above post from September, Brinsley suggests he should be put in prison for what he was planning

Keeping quiet: This September post, seemingly from inside a police station, is accompanied by another ominous message

'We don't respect pigs': In another post, Brinsley photographs an officer who stopped him and, judging from the caption, is deliberately unpleasant to him

Rage: Brinsley, posting this time from Atlanta, Georgia, rails against police again. A conspiracist friend suggests that undercover officers attack protesters on purpose

Some images were accompanied by ominous messages implying that he would be arrested if officers, always referred to as 'pigs', knew what he was thinking.

Police said Brinsley approached the passenger window of a marked police car and opened fire, striking Officers Rafael Ramos and Wenjian Liu in the head. The officers were on special patrol doing crime reduction work in the Bedford-Stuyvesant section of Brooklyn.

'They were, quite simply, assassinated - targeted for their uniform,' said Police Commissioner Bill Bratton, who looked pale and shaken at a hospital news conference.

The New York Yankees' Silver Shield Foundation has announced it will pay for the education of Rafael Ramos' two children.

The group will also set aside money for education-related expenses needed by both spouses of the murderered officers.

William Walters, chairman of the group which funds academic expenses for slain law enforcement officers, told ABC News: 'We just want to do good for these people that take care of us'.

Reflect on this tragic loss so we can move toward a peaceful coexistence Lucy Ramos, aunt of Rafael Ramos

He said they plan to discuss the funds with the families on Monday.

The first official words from Ramos' family came at a press conference on Sunday night.

The officer's aunt, Lucy Ramos, told reporters: 'I would like to thank all those who have shared their sympathy and support for our beloved family member, Rafael Ramos, who will always be loved and missed by many.

'I hope and pray that we can reflect on this tragic loss of lives that has occurred so that we can move forward and find an amicable patch to a peaceful coexistence.'

She added that the family extends their condolences to relatives of Officer Liu.

Brinsley took off running after the shooting. Officers chased him down to a nearby subway station, where he shot himself in the head as a subway train door full of people closed. A silver handgun was recovered at the scene, Bratton said.

According to an account of the event in the New York Post, Brinsley was trying to escape on the subway but killed himself when he was cornered by officers.

The Post reported that two Con Edison workers confronted Brinsley after he murdered the officers. Brinsley reportedly responded by threatening them, which caused them to back off.

But the exchange appears to have bought police vital time to track him onto the subway platform where he turned the gun on himself.

The sudden and extraordinary violence stunned the city, prompted a response from vacationing President Barack Obama and escalated weeks of simmering ill will between police and their critics following grand jury decisions not to indict officers in the deaths of Eric Garner in New York and Michael Brown in Missouri. Garner and Brown were black; the officers who killed them are white.

Demonstrators around the country have staged die-ins and other protests following the grand jury decisions. The New York police union head declared there's 'blood on the hands' of protesters and the city's mayor.

NYPD officers: The gunman fired a fatal round of bullets at Wenjian Liu (left) and Rafael Ramos (right)

Cash: Brinsley's social media feeds including gang motifs, including this photograph showing a wad of $100 bills

'This may be my final post,' Brinsley wrote in the post that included an image of a silver handgun. The post had more than 200 likes but also had many others admonishing his statements.

Bratton said the suspect made very serious 'anti-police' statements online but did not get into specifics of the posts.

The Rev. Al Sharpton said Garner's family has no connection to the suspect and denounced the violence.

'We have stressed at every rally and march that anyone engaged in any violence is an enemy to the pursuit of justice for Eric Garner and Michael Brown,' he said.

Brown's family condemned the shooting in a statement posted online by their attorney.

'We reject any kind of violence directed toward members of law enforcement. It cannot be tolerated. We must work together to bring peace to our communities,' the family said.

Most of the protests have been peaceful, particularly in New York. Bratton said police were investigating whether Brinsley had attended any rallies or demonstrations and why he had chosen to kill the officers.

Brinsley was black; the officers were Asian and Hispanic, police said.

Mayor Bill de Blasio said the killings of Ramos and Liu strike at the heart of the city.

'Our city is in mourning. Our hearts are heavy,' said de Blasio, who spoke softly with moist eyes. 'It is an attack on all of us.'

Vigil: Hundreds of mourners gathered on the corner of Tompkins and Myrtle Avenues to remember the cops

Mourning: The crowds sang 'we shall overcome' and 'this little light of mine' while laying flowers and candles

Tributes: NYPD badges were seen strewn among the mementos, including Christmas wreaths and holly

United: Members of the police force stood with members of the public to sing and mourn together

Scores of officers in uniform lined up three rows deep at the hospital driveway. The line stretched into the street. Officers raised their hands in a silent salute as two ambulances bore away the slain officers' bodies. The mayor ordered flags at half-staff.

In a statement Saturday night, Attorney General Eric Holder condemned the shooting deaths as senseless and 'an unspeakable act of barbarism.' Obama, vacationing in Hawaii, issued a statement saying he unconditionally condemns the slayings.

'The officers who serve and protect our communities risk their own safety for ours every single day — and they deserve our respect and gratitude every single day,' Obama said. 'Tonight, I ask people to reject violence and words that harm, and turn to words that heal — prayer, patient dialogue, and sympathy for the friends and family of the fallen.'

The tragedy ended a bizarre route for Brinsley that began in Maryland early Saturday. He went to the home of a former girlfriend in a Baltimore suburb and shot and wounded her. Police there said they noticed Brinsley posting from the woman's Instagram account threats to kill New York officers.

Baltimore-area officials sent a warning to New York City police, who received it moments too late, Bratton said.

But the posts were apparently online for hours, though it's not clear if anyone reported them. Bratton called on New Yorkers to alert authorities of any threats to police they see — even if they don't seem real. 'That information must get into the hands of the police officers,' he said.

First victim: Brinsley shot his former girlfriend Shaneka Thompson, 29, hours before the execution

Brinsley had a history of arrests in Georgia for robbery, disorderly conduct and carrying a concealed weapon. Bratton said his last-known address was in Georgia, but he had some ties to Brooklyn.

Meanwhile, the department grieved the sudden and violent loss of the officers.

'Both officers paid the ultimate sacrifice today while protecting the communities they serve,' Bratton said Saturday night.

Ramos was married with a 13-year-old son and had another in college, police and a friend said. He had been on the job since 2012 and was a school safety officer. Liu had been on the job for seven years and got married two months ago.

Rosie Orengo, a friend of Ramos, said he was heavily involved in their church and encouraged others in their marriages.

'He was an amazing man. He was the best father and husband and friend,' she said. 'Our peace is knowing that he's OK, and we'll see him in heaven.'

De Blasio and the president of the Patrolmen's Benevolent Association, Patrick Lynch, have been locked in a public battle over treatment of officers following the grand jury's decision. Just days ago, Lynch suggested police officers sign a petition that demanded the mayor not attend their funerals should they die on the job. On Saturday, some officers turned their backs on de Blasio as he walked into the hospital.