Liberal candidate Karen Wang has quit the Burnaby South byelection race over comments she posted on social media about NDP leader and candidate Jagmeet Singh.

In a WeChat post reported by StarMetro Vancouver, Wang wrote that as the only Chinese candidate, she could beat Jagmeet Singh, who she noted is of "Indian descent." Singh was born in Scarborough, Ont., to parents who immigrated to Canada from Punjab state in India.

"Recent online comments by Karen Wang are not aligned with the values of the Liberal Party of Canada," said a statement from the party.

"The Liberal Party has a clear commitment to positive politics and support for Canadian diversity, and the same is always expected of our candidates."

In a statement, Wang apologized to Singh and said her choice of words in the social media post was not well considered.

"In trying to speak about my own story and the importance of people of all different backgrounds getting involved in this important byelection, I made comments online that also referenced Jagmeet Singh's cultural background."

NDP Leader Jagmeet Singh, left, places a sign on supporter Paul Pelletreau's lawn while door-knocking for his byelection campaign in Burnaby, B.C., on Saturday. (Darryl Dyck/Canadian Press)

Political commentator Shachi Kurl, of the Angus Reid Institute, said Wang had little option but to resign, because her comments ran opposite to the Liberal Party's brand.

"In Canada in 2019 — especially in a very ethnically diverse riding — those comments are just untenable," she said. "It's a bit of boon to Jagmeet Singh, but perhaps not the end of the world in terms of the long game for the Liberal Party."

In response to Wang's resignation, Singh told CBC: "I intend to represent everyone, whether their background is Korean, Sri Lankan, Chinese, European, Japanese, South Asian, Vietnamese, African or Indigenous — anyone who calls Burnaby South their home."

NDP leader and candidate Jagmeet Singh responds to Wang's resignation:

Jagmeet Singh responds to the resignation of Liberal candidate Karen Wang in the Burnaby South byelection over racial comments that she made about the NDP leader. 0:53

The Liberal Party now has until Feb. 4 to nominate a new candidate for the Burnaby South byelection. The party's constitution also allows the leader to appoint someone.

Speaking on CBC News Network's Power & Politics Wednesday evening, Public Safety Minister Ralph Goodale said he expects the party will run another candidate.

Prime Minister Justin Trudeau announced on Jan. 9 that byelections for the ridings of York–Simcoe in Ontario, Outremont in Quebec and Burnaby South in B.C. will be held Feb. 25.