Experts have warned that a rise in communal violence could disrupt ongoing preparations for the polls scheduled in December.
Fighting between herders from two neighbouring states in central South Sudan has killed at least 39 people, officials said, blaming the violence on protracted land disputes.
South Sudan has been plagued by insecurity since winning independence from Sudan in 2011. A peace deal that ended a 2013-2018 civil war has significantly reduced violence, but lower-level clashes between rival communities frequently flare.
Violence remains rife in areas where rights to grazing areas, water, cultivation grounds and other resources are disputed.
Last week, more than 50 people, including women, children and two UN peacekeepers, were killed along South Sudan's border with Sudan when residents from one area attacked those from another as part of a boundary dispute.
In the latest incident, fighting between herders in Lakes State and Warrap State started on Wednesday and continued into Thursday.
In Lakes State, 20 people were killed and 36 wounded, said Major Elijah Mabor Makuach, the state's police spokesperson.
In neighbouring Warrap State, 19 people were killed and 17 wounded, said William Wol, its information minister.
"Every year, these two communities - they have internal clashes between Pakam of Lakes State and Luanygang of Warrap State and it could be traced back to land disputes," Wol said.
"Every dry season they do revenge against each other and these are some of the things that are causing these clashes."
Makuach said Lakes State security personnel sent to the scene of the clashes had contained the violence.