Let
G
be a graph with edge set
E
G
and
e
=
u
v
∈
E
G
. Define
n
u
e
,
G
and
m
u
e
,
G
to be the number of vertices of
G
closer to
u
than to
v
and the number of edges of
G
closer to
u
than to
v
, respectively. The numbers
n
v
e
,
G
and
m
v
e
,
G
can be defined in an analogous way. The Mostar and edge Mostar indices of
G
are new graph invariants defined as
M
o
G
=
∑
u
v
∈
E
G
n
u
u
v
,
G
−
n
v
u
v
,
G
and
M
o
e
G
=
∑
u
v
∈
E
G
m
u
u
v
,
G
−
m
v
u
v
,
G
, respectively. In this paper, an upper bound for the Mostar and edge Mostar indices of a tree in terms of its diameter is given. Next, the trees with the smallest and the largest Mostar and edge Mostar indices are also given. Finally, a recent conjecture of Liu, Song, Xiao, and Tang (2020) on bicyclic graphs with a given order, for which extremal values of the edge Mostar index are attained, will be proved. In addition, some new open questions are presented.