For months, Rong Yuan sensed that something was wrong at the engineering firm where she worked.

Often, her meals had a strange taste and an odd smell. Water that she had left unattended took on a strange flavor and odor, too. She repeatedly suffered from “immediate and significant health problems” after eating or drinking, according to court records. On more than one occasion, the symptoms became so severe that she had to go to the hospital.

Police in Berkeley, Calif., now believe that she was being slowly and methodically poisoned by a colleague, whose motives remain unclear.

As Berkeleyside first reported, David Xu, 34, was arrested Thursday and has been charged with attempting to kill Yuan, his co-worker at the small Bay Area company. Authorities allege that over the course of 18 months, he repeatedly slipped toxic metals into her food and water, causing her to become seriously ill.

The engineer’s surreptitious attempts to poison his colleague, and her subsequent illnesses, began sometime around Oct. 9, 2017, court records say. The strange smells and odd ailments started to seem even more suspicious the following winter, when, on two occasions, Yuan’s family members got sick after drinking from a water bottle that she had brought home from work.

Yuan finally discovered what was going on after she got the idea to review footage from a surveillance camera in her office, officials said in a probable-cause statement. On two occasions in February and March, they say, Xu could be seen adding a substance to her water bottle. Samples taken from her water bottle on both those days contained “a toxic amount of cadmium,” police wrote.

Police also took blood samples from Yuan and the two relatives who had fallen ill in November and December after drinking from her bottle. All three tested positive for elevated levels of cadmium, according to court papers.

Cadmium, a naturally occurring metal that police said could lead to “organ system toxicity, cancer and/or death,” has historically been used to create vivid pigments and paints with rich yellow, orange and red hues. Today, it is primarily used for manufacturing batteries. It was among the chemicals reportedly found in the basement laboratory of a German man who was sentenced to life in prison in March for poisoning his co-workers’ sandwiches because he was curious to see how the chemicals would affect their health.

Eating or drinking water with high cadmium levels irritates the stomach, leading to vomiting and diarrhea and sometimes death, according to the Agency for Toxic Substances and Disease Registry. Over a long period of time, the agency warns, consuming smaller amounts of cadmium can result in kidney damage and cause bones to become brittle and break more easily.

Xu and Yuan worked together at Berkeley Engineering and Research, which names 11 employees on its website and has yet to comment on the allegations. According to Berkeleyside, Xu was listed as the principal engineer before his arrest, when his résumé was scrubbed from the company’s site. He had worked there since 2009 and reportedly ran the company’s materials and metallurgy laboratory while also offering his services as an expert witness for trials.

In 2013, after bolts that were supposed to be holding together a new span of the San Francisco-Oakland Bay Bridge unexpectedly snapped, alarming commuters, reporters sought out Xu for his perspective as an experienced metallurgist.

"This is most likely a perfect storm situation,’’ he was quoted as telling the Associated Press. ‘‘A lot of these factors alone might not have caused this issue, but together most likely could have pushed it over the edge.’’

Yuan, who could not be reached for comment late Tuesday, is described on the company’s website as an engineer with a PhD in materials science.

Xu faces charges of attempted premeditated murder resulting in great bodily injury, which is considered a serious felony and carries a minimum life sentence in California. He has also been charged with two additional counts of felony poisoning stemming from the November and December incidents and is being held without bail.

“As you all know, he’s presumed innocent,” his attorney, Julia Jayne, told reporters at his arraignment Tuesday. “These are allegations, only allegations. Charges have been filed.”

Describing her client as someone who belongs to “a loving family and community” and presents no threat, Jayne also said that Xu had no prior criminal record, according to CBS San Francisco. She noted that he owns a home and is married with two children.

The Berkeley Police Department and Alameda County District Attorney’s office declined to comment on the case. Court records indicate that a plea hearing is set for Thursday.

Allyson Chiu contributed to this report.

More from Morning Mix:

She fled a ‘Jewish Taliban’ sect with her children. Then kidnappers tracked them down.

Nipsey Hussle and Lauren London shared a ‘modern-day love story.’ Now, she’s ‘completely lost.’

An intruder brought malware to Mar-a-Lago, which experts have warned was vulnerable

Nine died in the nation’s deadliest biker shootout. Texas prosecutors couldn’t convict a single person.