RIO DE JANEIRO (AP) — Japan swept the judo gold medals at the Rio de Janeiro Olympics on Wednesday, taking the top spot in both men's and women's middleweight divisions.

Haruka Tachimoto struck gold first by defeating triple world champion Yuri Alvear in the women's 70-kilogram division.

Despite being penalized for passivity in the first minutes of the final — and a partisan crowd cheering against her — Tachimoto managed to pin Alvear to the ground for 20 seconds, scoring an ippon victory that automatically ends the bout.

Alvear, 30, won a bronze at the London Olympics. She was Colombia's flag bearer at the opening ceremony.

After a disappointing seventh-place finish at the London Games, Tachimoto said she refocused her style, training in Mongolia and England, and honing a more defensive, counterattacking style that she used to defeat Alvear.

The women's bronze medals were won by Britain's Sally Conway and Germany's Laura Vargas Koch.

A short time after the women's medal competition ended, Japan's Mashu Baker took the judo gold in the men's 90-kilogram division.

The second-seeded Baker, 21, defeated Georgia's Varlam Liparteliani in a cagey final in which Baker managed to score only once. Like Tachimoto, he too was booed by the crowd, which expressed disapproval that Baker appeared to be withdrawing from the fight in its final minutes. But with Liparteliani failing to score, Baker's one throw was enough to win.

Baker, whose father is American, trained at the Kodokan, the spiritual home of the Japanese martial art and its most famed dojo after starting judo at age 6. Baker has won four judo Grand Slam titles and took a bronze at last year's world championships. He was raised by his mother in Japan and said he was dedicating his gold medal to her. She traveled with him to Rio.

"To be an Olympic champion was my dream when I was young, so I'm very happy now," he said. Baker acknowledged that he fought defensively in the latter part of the fight, seeking to protect his slight lead by not risking being attacked by Liparteliani.

Liparteliani was seeded fifth and fought at the London Olympics but got knocked out in the second round. The loss left him in tears and he struggled to maintain his composure through the medals ceremony.

The men's bronze medals were won by South Korea's Donghan Gwak and China's Xunzhao Cheng.

Japan's two golds Wednesday put the country atop the judo medal table, adding to the gold already won by Shohei Ono in the men's 73-kilogram division Monday. Although Japan dominated for years at the Olympics in the martial art it developed, the country had its worst performance at the London Games, where it won only one gold.

"We have to perform graciously and courageously because Japan is the home of judo," Tachimoto said after her win. "Judo is one of the most important sports to the Japanese people, and they expect gold medals."