A search for the pair production of first-generation scalar leptoquarks is performed using proton-proton collision data recorded at 13 TeV center-of-mass energy with the CMS detector at the LHC. The data correspond to an integrated luminosity of 35.9 fb−1. The leptoquarks are assumed to decay promptly to a quark and either an electron or a neutrino, with branching fractions β and 1−β, respectively. The search targets the decay final states comprising two electrons, or one electron and large missing transverse momentum, along with two quarks that are detected as hadronic jets. First-generation scalar leptoquarks with masses below 1435 (1270) GeV are excluded for β=1.0(0.5). These are the most stringent limits on the mass of first-generation scalar leptoquarks to date. The data are also interpreted to set exclusion limits in the context of an R-parity violating supersymmetric model, predicting promptly decaying top squarks with a similar dielectron final state.