VANCOUVER, British Columbia — The reasons the United States asked the Canadian authorities to arrest a top executive of the Chinese technology company Huawei last week had been shrouded in mystery.

Until Friday, when the details of the arrest and what led up to it came out in a Canadian courtroom.

At a bail hearing in Vancouver for Meng Wanzhou, the chief financial officer of Huawei and a daughter of the company’s founder, Canadian prosecutors said she was accused of fraud. The heart of the charges related to how Meng may have personally participated in a scheme to trick American financial institutions into making transactions that violated U.S. sanctions against Iran, they said.

Meng had ‘‘direct involvement’’ with Huawei’s representations to banks, said John Gibb-Carsley, an attorney with Canada’s Justice Department.

The hearing shed light on an incident that has rattled the relationship between the United States and China. While changing planes in Vancouver on Dec. 1, Meng was arrested at the behest of the United States, which has long regarded Huawei as being closely tied to the Chinese government.

Her arrest occurred as the United States and China are about to enter negotiations to cease a brutal trade war. Because of Meng’s stature in China as a top executive and part of its elite, news of her arrest has rippled through the country.

With Meng, 46, seated inside a glass box at British Columbia’s Supreme Court, Gibb-Carsley laid out what had led to her arrest. He said that between 2009 and 2014, Huawei used a Hong Kong company called Skycom Tech to make transactions in Iran and do business with telecom companies there, in violation of U.S. sanctions against Iran. Banks in the United States cleared financial transactions for Huawei, inadvertently doing business with Skycom, he said.

The banks were ‘‘victim institutions’’ of fraud by Meng, Gibb-Carsley said.

In 2013, articles by Reuters alleged that Huawei was using Skycom to do business in Iran, and had attempted to import American-made computer equipment into the country, in violation of sanctions. Several financial institutions asked Huawei if the allegations were true, Gibb-Carsley said.

At the time, Meng arranged a meeting with an executive from one of the financial institutions, he said. During the meeting, she spoke through an English interpreter and presented PowerPoint slides in Chinese, saying that Huawei operated in Iran in strict compliance with U.S. sanctions. Meng explained that Huawei’s engagement with Skycom was part of normal business operations and that Huawei had once held shares in Skycom but had since sold them.

But there was no distinction between Skycom and Huawei, Gibb-Carsley said. Huawei operated Skycom as an unofficial subsidiary, making efforts to keep the connection between the companies secret.

Skycom employees used Huawei email addresses and had badges and letterhead featuring the Huawei logo, he said. Skycom documents showed that an entity to which the company was sold in 2009 was also controlled by Huawei until at least 2014, according to an affidavit read in court.

Meng’s presentation to the unnamed financial institution constituted fraud, Gibb-Carsley said.

A warrant for Meng’s arrest was issued in the Eastern District of New York on Aug. 22, he added. A Canadian justice then issued a warrant for Meng on Nov. 30 after it became known that she would change planes in Vancouver on her way from Hong Kong to Mexico.

Marc Raimondi, a spokesman for the U.S. Justice Department, declined to comment on the charges revealed in court on Friday.

The accusations against Meng and Huawei are similar to ones the U.S. government made in 2016 against ZTE, another large Chinese technology company. In that case, American officials released internal ZTE documents in which executives had described creating ‘‘cutoff companies’’ that would do business with Iran, North Korea and other nations placed under sanctions by the U.S. government.

Gibb-Carsley argued against bail for Meng. He said that she had no strong ties in Canada and had vast financial resources, and that China had no extradition treaties with the United States or Canada.

An attorney for Meng, David Martin, offered two properties in Vancouver and a cash deposit to secure her bail. Meng would not breach a court order, Martin said. Doing so, he added, would ‘‘humiliate and embarrass her father, who she loves,’’ and embarrass Huawei’s thousands of employees. Meng’s father is Ren Zhengfei, Huawei’s founder.

‘‘She would not embarrass China itself,’’ Martin said.

The judge in the case was expected to rule on the bail request later on Friday.

Any extradition process can take weeks or months, depending on the rules of the country that arrests the suspect and whether the suspect chooses to fight the extradition request. The U.S. Justice Department must now present evidence to the Canadian court that supports its request and has 60 days from the arrest to make a full request for extradition.