WASHINGTON — The results are in from the first big test of the Republican Party’s efforts to recruit and elect more women to Congress this election cycle — and rebuild its majority.

And things are not looking good.

Dr. Joan Perry, a newcomer whom Republicans regarded as a top recruit for 2020, was soundly defeated on Tuesday by Dr. Greg Murphy, a state legislator, in a House Republican primary race in North Carolina that illustrated how steep the party’s climb will be as it tries to build more gender diversity. A very conservative female physician stood against a very conservative male physician, and all things being equal, the man won.

“Of course it was disappointing,” said Representative Elise Stefanik, Republican of New York, who supported Dr. Perry and has dedicated her political arm to electing more Republican women. “I am concerned about this false assumption that is made that somehow women candidates are not conservative. That is not the case. Women candidates are just as ideologically diverse in the Republican Party as male candidates are.”

Party leaders conceded that Republicans would have to redouble their efforts.

“I think people are going to have to do more, yes,” said Representative Kevin McCarthy of California, the Republican leader.