Image copyright CBS Image caption Rashon Nelson (L) and Donte Robinson (R) will each receive $1 and a promise from the city to set up a youth programme

Two black men who were arrested at a Starbucks cafe by Philadelphia police last month have reached a financial settlement with the city.

Rashon Nelson and Donte Robinson will each receive a symbolic $1 and a promise from officials to set up a programme for young entrepreneurs.

The arrest of the men, who had not yet ordered and were waiting for a friend, kicked off a row over racial profiling.

Starbucks announced days later it would require employee anti-bias training.

Media playback is unsupported on your device Media caption Watch the arrest of two black men at Starbucks - and the protests that followed

The settlement, which was confirmed to BBC News by a spokesman for Philadelphia Mayor Jim Kenny, includes a vow from the city to contribute $200,000 (£147,000) to the new programme.

The grant money will go towards creating a pilot programme "for city public high school students with aspirations of becoming entrepreneurs, as envisioned by Robinson and Nelson, who will not receive any money from the grant", the city announced in a press release.

The 12 April arrest led to protests at Starbucks cafes around the country, while other customers shared claims of racial profiling by company staff.

The arrest was captured on mobile phone video and showed the men being led away in handcuffs after a manager had accused them of trespassing and causing a disturbance.

The two longtime friends, both 23, had just sat down at the coffee chain's downtown location for a meeting to discuss a possible real estate deal.

After spending hours in jail, they were released and no charges were filed.

The Philadelphia chief of police later apologised for his handling of the arrest.

Mayor Kenney said in a statement that he was "pleased to have resolved the potential claims against the city in this productive manner".

"This was an incident that evoked a lot of pain in our city," he continued.

"Rather than spending time, money, and resources to engage in a potentially adversarial process, Rashon Nelson and Donte Robinson approached the city and invited us to partner with them in an attempt to make something positive come of this.

"This agreement is the result of those conversations, and I look forward to seeing the fruits of this effort in the coming months and years."

Media playback is unsupported on your device Media caption Brandon Ward’s video of his encounter at a Starbucks has gone viral

Starbucks CEO Kevin Johnson came to Philadelphia to personally apologise to the two men.

In a joint statement with Mr Nelson and Mr Robinson, Starbucks announced that it had reached a separate financial settlement with the men earlier this week.

That confidential settlement "will allow both sides to move forward and continue to talk and explore means of preventing similar occurrences at any Starbucks locations", the statement said.

Mr Johnson added that he wishes to "thank Donte and Rashon for their willingness to reconcile".

Mr Nelson and Mr Robinson jointly said they appreciate the effort to foster communication, and add "we will be measured by our action not words".

As part of the settlement both men have been offered university scholarships by Starbucks, and the opportunity to meet former US Attorney Eric Holder, who has been hired "as part of the company's long-term diversity and equity efforts".

The company plans to close more than 8,000 stores in the US on 29 May for anti-bias training.