Google was forced to settle a claim of race discrimination by one of its contractors after he claimed he was repeatedly treated as a terror suspect while working on a covert research project to navigate shopping centres for Google Maps.

Ahmed Rashid (not his real name), a UK citizen of Moroccan descent, had an offer of a new contract abruptly withdrawn after he complained to Google about being frequently harassed, racially profiled, and accused of acting like a terrorist while conducting undercover research for Google in retail malls across the UK, he claimed.

Google denied wrongdoing, but agreed to pay Rashid £4,000 to settle the case this year. As part of the deal, Rashid agreed not to discuss the case, but decided to speak out after seeing Google staff stage a global walkout over various forms of discrimination at the company.

He claimed that the secretive nature of his work for Google, which was done without the awareness of the shops or shopping centres involved, made him particularly vulnerable to racial profiling and harassment.

Speaking to the Guardian he said: “There was a complete disregard for the safety and interest of contractors. This research was being conducted in secret at the expense of the security of Google contractors that fit a stereotypically Muslim/Arab profile.”

Google sees major claims of harassment and discrimination as lawsuits proceed Read more

As part of his work for Google, which he did last year through a third party contractor, Rashid said he was required to surreptitiously gather information about the strength and range of wifi signals inside individual stores in the targeted shopping centres. The project, known as Expedite, was intended to help Google Map users locate themselves in retail malls through wifi data rather than GPS, which is unreliable in covered shopping centres.

Rashid and his team had to walk around the targeted stores for set times of six, eight, or 12 minutes depending on the size of the shop. The information was recorded on a private Google app installed on researchers’ phones. Rashid and one of his teammates said they were instructed not to identify themselves to the staff in the stores. It was this secrecy that made Rashid vulnerable to suspicion and harassment, he claimed.

He said: “I was the only one on the team who was visibly Arab, and I was getting stopped and harassed so much by security and shopping centre staff. I wasn’t allowed to tell them I was working for Google and doing that job.”

He added: “I was worried going to work because I thought I might get arrested. That’s what I was living with for 10 months, it was so isolating. It pushed me point of feeling suicidal. The looks I was getting, I just felt completely outcast.”

A white former colleague, who also signed a non-disclosure agreement about the project, said Google should have done more to protect Rashid. He said: “It would have been helpful to all of us to have ID because we all got stopped, but a lot of us didn’t have problems because we were white. Google could have done more to help him.”

Revealed: Google tried to block media coverage of gender discrimination case Read more

The shopping centres where Rashid faced harassment from shop staff and security included Westfield in west London.

A spokeswoman for Westfield confirmed that the shopping centre was “not aware or involved” in the project. “Westfield does not have the ability to control its retailers’ wifi systems, or provide access to them,” she said.

Rashid said he reported various incidents to Google and asked to be allowed to wear a badge to identify himself to stores to avoid suspicion. But his requests were ignored, he said. When he complained about being followed by security at the Liberty shopping centre in Romford on 29 September last year, a new contract he had been promised was withdrawn later that day, he claimed.

Rashid also conducted research in Europe on a related project to map shopping malls. On this project, shopping centres were informed in advance, but he said he was not provided with a badge to identify himself as a Google researcher. In a shopping centre outside Paris he said he was pulled aside by security in front of a crowd. He was also stopped at shopping centre in Naples, he said.

“Someone asked me point blank if I was a terrorist because I was walking around with a laptop and a backpack. It was so humiliating.”

Rashid claimed Google failed to consider how researchers from Arab backgrounds would be treated without means of identification. “Obviously no one thought about that because there weren’t any Arabs on the board designing this project. I requested numerous times to have a badge, and to be able to tell people I was coming in advance. But that was just ignored.”

Campaigners who organised the global walkout urged Google to stop using non-disclosure agreements to silence victims. In response, the company has pledged to overhaul its sexual harassment policies. Rashid says it should go further to cover other race discrimination cases. “We need to address sexual misconduct, but nobody is talking about intersectional issues, like institutional discrimination and racism.”

Google confirmed that its researchers regularly check on the physical location of wifi signals. But it claimed that as this was publicly available information, it was not required to seek permission for this work. A spokesman said: “If asked, they [operators] are instructed to be forthright about the fact that they’re working on behalf of Google.”

In a statement it said: “We often work with service providers to measure wifi signal strength, which helps us improve Google’s mapping products. All employees and contractors are provided with clear guidelines that outline the details of their project and role, and they’re instructed to be forthright about the fact that they’re working on behalf of Google.”