Rios crushed a towering two-run homer in the seventh inning off reliever Atsushi Nohmi to break open a taut pitchers' duel as Japan lost a chance to extend their domination of the world's top international tournament.
Japan, winners of the first two WBC titles in 2006 and 2009, squandered their best chance in the eighth on a critical base-running gaffe.
After a one-out run made it 3-1 with men on first and second, Seiichi Uchikawa broke for second base on a pitch to Shinnosuke Abe, while lead runner Hirokazu Ibata held his ground. Catcher Yadier Molina ran all the way toward second to tag out Uchikawa, and Abe then grounded out to end the threat.
Puerto Rico, who used five relievers after a sterling starting effort by Mario Santiago, will play the winner of Monday's semi-final between unbeaten Dominican Republic and the Netherlands and the WBC will crown a new champion on Tuesday.