Lewis and Ko, 17, first played together two years ago, developing an on-course friendship featuring fist bumps and lots of chatter.
''We've played a lot of golf together,'' said Lewis, 12 years older than her counterpart. ''I was impressed with her then. I think the best part of her game is the maturity.''
The third-ranked Lewis and fourth-ranked Ko each shot 4-under 68 at Lake Merced. Winless since the Women's British Open in August, Lewis had a 10-under 206 total.
Ko won the Canadian Women's Open as an amateur the last two years and took the Swinging Skirts World Ladies Masters in December in Thailand in her second start as a professional. She has five victories in pro events.
Lewis and Ko first played each other in the final round of the 2012 Canadian Open, when the then 15-year-old became the youngest winner in LPGA history.
''We both play fast and we got into a good rhythm,'' said Lewis, who has five runner-up finishes since her victory at St. Andrews. ''It's nice to play with someone who is playing well. I think it made both of us elevate our game.''
Lewis matched shots with Ko, who celebrated her birthday Thursday, throughout the day to retain her edge.
''It's fun watching Stacy play,'' Ko said. ''She does make me feel like I have to play better. I always knew she was good. Her rankings and scores show that. It's really good for me, as a rookie, to play with a player like Stacy. It's a great opportunity for me to learn from another great player.''
They've played together through the first three rounds.
''It's fun to be in the last group,'' Lewis said. ''I know the crowd got into there. I think they were tired of us making pars, so we both went on a run there and made a few birdies for them.''
Lewis played bogey-free on a difficult course that was hit hard by rain Friday.
''This is probably the worst I've hit the ball all week,'' she said. ''This course is so hard you can make a bogey real quick. I was putting good, so when I hit a couple of good putts for par, I got some momentum going.''
Jenny Shin was four strokes back at 6 under. She also shot 68.
''My whole life I hit my putts short,'' Shin said. ''Hitting it past the hole was my main goal this year. I had some long putts that fell in that helped turn it into a better round.''
Hee Young Park also shot a 68 to move into fourth at 5 under.
''It was freezing and rainy yesterday and the wind was always changing,'' she said. ''Today the weather was perfect. That was the big difference.''
Michelle Wie, the winner last week in Hawaii, was tied for 13th at 1 under after a 71. She played the first two rounds with Lewis and Ko.
''I think I was just a little tired from last week,'' Wie said. ''So many emotions, celebrating, and traveling back here. I got some good rest.''